Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExhausted = errors.New("retry list is exhausted")
ErrExhausted is returned by shift calls when there are no pending messages and new reads are disabled.
Functions ¶
This section is empty.
Types ¶
type AckFunc ¶
AckFunc is a synchronous function that matches the standard acknowledgment signature in Benthos.
type List ¶
type List[T any] struct { // contains filtered or unexported fields }
List contains a slice of items that are pending an acknowledgement, once items are added it's required that all rejected adopted T values are recirculated either via TryShift (non-blocking) or Shift.
func NewList ¶
func NewList[T any](reader ReadFunc[T], mutator MutatorFunc[T]) *List[T]
NewList returns a new list of Ts requiring automatic retries.
type MutatorFunc ¶
MutatorFunc is an optional closure used to mutate a T about to be scheduled for retry based on the returned error. This is useful for reducing a batch based on a batch error, etc.
Click to show internal directories.
Click to hide internal directories.