Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrSendToClose ... ErrSendToClose = errors.New("send to close accumulator") )
Functions ¶
This section is empty.
Types ¶
type Accumulator ¶
type Accumulator[T any] struct { // contains filtered or unexported fields }
func New ¶
func New[T any]( flushSize uint, flushInterval time.Duration, flushFunc FlushExec[T], ) *Accumulator[T]
New creates a new data Accumulator
func (*Accumulator[T]) AddAsync ¶
func (a *Accumulator[T]) AddAsync(ctx context.Context, event T) error
func (*Accumulator[T]) AddSync ¶
func (a *Accumulator[T]) AddSync(ctx context.Context, event T) error
func (*Accumulator[T]) IsClosed ¶ added in v1.1.4
func (a *Accumulator[T]) IsClosed() bool
func (*Accumulator[T]) Stop ¶
func (a *Accumulator[T]) Stop()
Click to show internal directories.
Click to hide internal directories.