Versions in this module Expand all Collapse all v0 v0.40.4 May 19, 2022 Changes in this version + var ErrWrongEpoch = errors.New("ring buffer: wrong epoch") + func GoWithCancel(ctx context.Context, g *errgroup.Group, f func(context.Context) error) func() + type Action func(ctx context.Context, val interface{}) error + type ActionExecutor struct + func NewActionExecutor(ctx context.Context, action Action, concurrency uint32, maxBuffer uint64) *ActionExecutor + func (aq *ActionExecutor) Execute(val interface{}) + func (aq *ActionExecutor) WaitForEmpty() error + type AsyncReader struct + func NewAsyncReader(rf ReadFunc, bufferSize int) *AsyncReader + func (asRd *AsyncReader) Close() error + func (asRd *AsyncReader) Read() (interface{}, error) + func (asRd *AsyncReader) Start(ctx context.Context) error + type ReadFunc func(ctx context.Context) (interface{}, error) + type RingBuffer struct + func NewRingBuffer(allocSize int) *RingBuffer + func (rb *RingBuffer) Close() error + func (rb *RingBuffer) Pop() (item interface{}, err error) + func (rb *RingBuffer) Push(item interface{}, epoch int) error + func (rb *RingBuffer) Reset() int + func (rb *RingBuffer) TryPop() (item interface{}, ok bool)