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

Method ReadRecord

protocol/record_batch.go:95–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95func (m *multiRecordReader) ReadRecord() (*Record, error) {
96 for {
97 if m.index == len(m.batches) {
98 return nil, io.EOF
99 }
100 r, err := m.batches[m.index].ReadRecord()
101 if err == nil {
102 return r, nil
103 }
104 if !errors.Is(err, io.EOF) {
105 return nil, err
106 }
107 m.index++
108 }
109}
110
111// optimizedRecordReader is an implementation of a RecordReader which exposes a
112// sequence.

Callers

nothing calls this directly

Calls 1

ReadRecordMethod · 0.65

Tested by

no test coverage detected