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
()
| 126 | // is always valid and can be used to either read a message or an error in cases |
| 127 | // where that's convenient. |
| 128 | func (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. |
no outgoing calls