Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultDataChanSize = 1000 DefaultSize = 100 DefaultBuffer = 100 DefaultWorker = 5 DefaultInterval = time.Second )
Functions ¶
This section is empty.
Types ¶
type Batcher ¶
type Batcher[T any] struct { Do func(ctx context.Context, channelID int, val *Msg[T]) OnComplete func(lastMessage *T, totalCount int) Sharding func(key string) int Key func(data *T) string HookFunc func(triggerID string, messages map[string][]*T, totalCount int, lastMessage *T) // contains filtered or unexported fields }
type Option ¶
type Option func(c *Config)
func WithBuffer ¶
func WithDataBuffer ¶
func WithInterval ¶
func WithSyncWait ¶
func WithWorker ¶
Click to show internal directories.
Click to hide internal directories.