multiqueue

package
v0.4.22 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2024 License: MIT Imports: 4 Imported by: 0

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 any] interface {
	Add(ctx context.Context, threadId string, msg T) (err error)
	CloseThread(threadId string) (err error)
	Close() (err error)
}

func New

func New[T any](h HandleFunc[T], maxThreadSize int) MultiQueue[T]

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL