Documentation ¶
Index ¶
- Variables
- type Core
- func (c *Core[T]) Add(ctx context.Context, item T) error
- func (c *Core[T]) BAdd(item T) error
- func (c *Core[T]) DoneInCounter()
- func (c *Core[T]) GetInCounter() int64
- func (c *Core[T]) GetOutinCounter() int64
- func (c *Core[T]) Receive() (chan []T, error)
- func (c *Core[T]) Start(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrReceiveInternalQueue = errors.New("unable read internal queue")
View Source
var ErrUnableAdd = errors.New("unable to add")
Functions ¶
This section is empty.
Types ¶
type Core ¶
type Core[T any] struct { Ticker *time.Ticker // 至少多久尝试输出一次 BatchSize int64 // 一次聚合多少 // contains filtered or unexported fields }
func (*Core[T]) DoneInCounter ¶
func (c *Core[T]) DoneInCounter()
func (*Core[T]) GetInCounter ¶
func (*Core[T]) GetOutinCounter ¶
Click to show internal directories.
Click to hide internal directories.