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

Interface RecordReader

protocol/record_batch.go:14–22  ·  protocol/record_batch.go::RecordReader

RecordReader is an interface representing a sequence of records. Record sets are used in both produce and fetch requests to represent the sequence of records that are sent to or receive from kafka brokers. RecordSet values are not safe to use concurrently from multiple goroutines.

Source from the content-addressed store, hash-verified

12//
13// RecordSet values are not safe to use concurrently from multiple goroutines.
14type RecordReader interface {
15 // Returns the next record in the set, or io.EOF if the end of the sequence
16 // has been reached.
17 //
18 // The returned Record is guaranteed to be valid until the next call to
19 // ReadRecord. If the program needs to retain the Record value it must make
20 // a copy.
21 ReadRecord() (*Record, error)
22}
23
24// NewRecordReader constructs a reader exposing the records passed as arguments.
25func NewRecordReader(records ...Record) RecordReader {

Callers 8

readRecordsFunction · 0.65
TestClientPipelineFunction · 0.65
assertRecordsFunction · 0.65
forEachRecordFunction · 0.65
ReadRecordMethod · 0.65
ReadRecordMethod · 0.65
ReadRecordMethod · 0.65

Implementers 10

writerRecordswriter.go
messageprotocol/record_v1.go
recordReaderprotocol/record_batch.go
multiRecordReaderprotocol/record_batch.go
optimizedRecordReaderprotocol/record_batch.go
emptyRecordReaderprotocol/record_batch.go
ControlBatchprotocol/record_batch.go
RecordBatchprotocol/record_batch.go
MessageSetprotocol/record_batch.go
RecordStreamprotocol/record_batch.go

Calls

no outgoing calls

Tested by

no test coverage detected