Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrThreadNotExists = errors.New("multiQueue: thread not exists") ErrClosed = errors.New("multiQueue: closed") )
Functions ¶
This section is empty.
Types ¶
type HandleFunc ¶
type HandleFunc[T any] func(msg T)
type MultiQueue ¶
type MultiQueue[T Sizeable] interface { Add(ctx context.Context, threadId string, msg T) (err error) CloseThread(threadId string) (err error) ThreadIds() []string Close() (err error) }
func New ¶
func New[T Sizeable](h HandleFunc[T], updater sizeUpdater, msgType int, maxThreadSize int) MultiQueue[T]
Click to show internal directories.
Click to hide internal directories.