Documentation ¶
Index ¶
Constants ¶
View Source
const ( QueueWorkerCount = 20 QueueWorkerBufferSize = QueueWorkerCount * 1_000 // 1k jobs per worker )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type InMemoryQueueDriver ¶
type InMemoryQueueDriver[T any] struct { // contains filtered or unexported fields }
func NewInMemoryQueueDriver ¶
func NewInMemoryQueueDriver[T any](name string) *InMemoryQueueDriver[T]
func (InMemoryQueueDriver[T]) Enqueue ¶
func (qd InMemoryQueueDriver[T]) Enqueue(item T)
func (*InMemoryQueueDriver[T]) SetListener ¶
func (qd *InMemoryQueueDriver[T]) SetListener(l Listener[T])
func (InMemoryQueueDriver[T]) Start ¶
func (qd InMemoryQueueDriver[T]) Start()
func (InMemoryQueueDriver[T]) Stop ¶
func (qd InMemoryQueueDriver[T]) Stop()
type InputQueueSetter ¶
type Pipeline ¶
type Pipeline[T any] struct { // contains filtered or unexported fields }
func (*Pipeline[T]) GetQueueForStep ¶
type Queue ¶
type Queue[T any] struct { EnqueuePreprocessorFn func(context.Context, T) T ListenPreprocessorFn func(context.Context, T) (context.Context, T) // contains filtered or unexported fields }
func NewQueue ¶
func NewQueue[T any](driver QueueDriver[T], itemProcessor QueueItemProcessor[T]) *Queue[T]
func (*Queue[T]) InitializeMetrics ¶
func (*Queue[T]) SetDriver ¶
func (q *Queue[T]) SetDriver(driver QueueDriver[T])
type QueueDriver ¶
type QueueItemProcessor ¶
type Step ¶
type Step[T any] struct { Driver workerDriver[T] Processor StepProcessor[T] InputQueueOffset int }
type StepProcessor ¶
type StepProcessor[T any] interface { QueueItemProcessor[T] SetOutputQueue(Enqueuer[T]) }
Click to show internal directories.
Click to hide internal directories.