Documentation
¶
Index ¶
- type Config
- type ProcessFunc
- type Queue
- func (m *Queue[T]) Push(ctx context.Context, data T) error
- func (m *Queue[T]) ShouldUpdate(size, workerCount int) bool
- func (m *Queue[T]) Shutdown(ctx context.Context) error
- func (m *Queue[T]) Size() int
- func (m *Queue[T]) StartWorkers()
- func (m *Queue[T]) TenantID() string
- func (m *Queue[T]) WorkerCount() int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ProcessFunc ¶
type Queue ¶
type Queue[T any] struct { // contains filtered or unexported fields }
Queue represents a single tenant's queue.
func (*Queue[T]) ShouldUpdate ¶
ShouldUpdate returns true if the queue size or worker count (alive or total) has changed
func (*Queue[T]) StartWorkers ¶
func (m *Queue[T]) StartWorkers()
func (*Queue[T]) WorkerCount ¶
WorkerCount returns the number of expected workers.
Click to show internal directories.
Click to hide internal directories.