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.
| 12 | // |
| 13 | // RecordSet values are not safe to use concurrently from multiple goroutines. |
| 14 | type 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. |
| 25 | func NewRecordReader(records ...Record) RecordReader { |
no outgoing calls
no test coverage detected