MCPcopy
hub / github.com/segmentio/kafka-go / ReadRecord

Method ReadRecord

protocol/record_batch.go:337–358  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

335}
336
337func (s *RecordStream) ReadRecord() (*Record, error) {
338 for {
339 if s.index < 0 || s.index >= len(s.Records) {
340 return nil, io.EOF
341 }
342
343 if _, isControl := s.Records[s.index].(*ControlBatch); isControl {
344 s.index++
345 continue
346 }
347
348 r, err := s.Records[s.index].ReadRecord()
349 if err != nil {
350 if errors.Is(err, io.EOF) {
351 s.index++
352 continue
353 }
354 }
355
356 return r, err
357 }
358}

Callers

nothing calls this directly

Calls 1

ReadRecordMethod · 0.65

Tested by

no test coverage detected