Versions in this module Expand all Collapse all v1 v1.0.1 Jun 16, 2021 v1.0.0 Jun 11, 2021 Changes in this version + type BulkExecutor struct + func NewBulkExecutor(execute Execute, opts ...BulkOption) *BulkExecutor + func (be *BulkExecutor) Add(task interface{}) error + func (be *BulkExecutor) Flush() + func (be *BulkExecutor) Wait() + type BulkOption func(options *bulkOptions) + func WithBulkInterval(duration time.Duration) BulkOption + func WithBulkTasks(tasks int) BulkOption + type ChunkExecutor struct + func NewChunkExecutor(execute Execute, opts ...ChunkOption) *ChunkExecutor + func (ce *ChunkExecutor) Add(task interface{}, size int) error + func (ce *ChunkExecutor) Flush() + func (ce *ChunkExecutor) Wait() + type ChunkOption func(options *chunkOptions) + func WithChunkBytes(size int) ChunkOption + func WithFlushInterval(duration time.Duration) ChunkOption + type DelayExecutor struct + func NewDelayExecutor(fn func(), delay time.Duration) *DelayExecutor + func (de *DelayExecutor) Trigger() + type Execute func(tasks []interface{}) + type LessExecutor struct + func NewLessExecutor(threshold time.Duration) *LessExecutor + func (le *LessExecutor) DoOrDiscard(execute func()) bool + type PeriodicalExecutor struct + func NewPeriodicalExecutor(interval time.Duration, container TaskContainer) *PeriodicalExecutor + func (pe *PeriodicalExecutor) Add(task interface{}) + func (pe *PeriodicalExecutor) Flush() bool + func (pe *PeriodicalExecutor) Sync(fn func()) + func (pe *PeriodicalExecutor) Wait() + type TaskContainer interface + AddTask func(task interface{}) bool + Execute func(tasks interface{}) + RemoveAll func() interface{}