Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { MaxWorkers int // A pool of workers channels that are registered with the dispatcher WorkerPool chan chan Job Workers []Worker }
func NewDispatcher ¶
func NewDispatcher(maxWorkers int) *Dispatcher
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run(queues int) chan Job
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
type Worker ¶
type Worker struct { WorkerPool chan chan Job JobChannel chan Job // contains filtered or unexported fields }
Worker represents the worker that executes the job
Click to show internal directories.
Click to hide internal directories.