github.com/Jeffail/benthos/v3@v3.65.0/lib/buffer/parallel/interface.go (about) 1 package parallel 2 3 //------------------------------------------------------------------------------ 4 5 // AckFunc is a func returned when a message is read from a parallel buffer. The 6 // func should be called when the message is finished with, and a flag indicates 7 // whether the message was successfully propagated and can be removed from the 8 // buffer. Returns the current backlog of the buffer in bytes, or an error if 9 // the message was not successfully removed. 10 // 11 // If an error is returned it is safe to call the function again. Otherwise, it 12 // is not. 13 // 14 // It is safe to call this func even if the buffer has closed. 15 type AckFunc func(ack bool) (int, error) 16 17 //------------------------------------------------------------------------------