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

Method Err

batch.go:128–128  ·  view source on GitHub ↗

Err returns a non-nil error if the batch is broken. This is the same error that would be returned by Read, ReadMessage or Close (except in the case of io.EOF which is never returned by Close). This method is useful when building retry mechanisms for (*Conn).ReadBatch, the program can check whether

()

Source from the content-addressed store, hash-verified

126// is always valid and can be used to either read a message or an error in cases
127// where that's convenient.
128func (batch *Batch) Err() error { return batch.err }
129
130// Read reads the value of the next message from the batch into b, returning the
131// number of bytes read, or an error if the next message couldn't be read.

Callers 15

TestIssue672Function · 0.45
TestIssue806Function · 0.45
LookupPartitionMethod · 0.45
LookupPartitionsMethod · 0.45
connectTLSMethod · 0.45
prepareReaderFunction · 0.45
TestErrorCannotConnectFunction · 0.45
roundTripMethod · 0.45

Calls

no outgoing calls