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

Method ReadControlRecord

protocol/record_batch.go:263–275  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

261}
262
263func (c *ControlBatch) ReadControlRecord() (*ControlRecord, error) {
264 r, err := c.ReadRecord()
265 if err != nil {
266 return nil, err
267 }
268 if r.Key != nil {
269 defer r.Key.Close()
270 }
271 if r.Value != nil {
272 defer r.Value.Close()
273 }
274 return ReadControlRecord(r)
275}
276
277func (c *ControlBatch) Offset() int64 {
278 return c.BaseOffset

Callers 1

TestControlRecordFunction · 0.95

Calls 3

ReadRecordMethod · 0.95
ReadControlRecordFunction · 0.85
CloseMethod · 0.45

Tested by 1

TestControlRecordFunction · 0.76