Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxQueue = os.Getenv("MAX_QUEUE")
View Source
var MaxWorker = os.Getenv("MAX_WORKER")
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { WorkerPool chan chan Job MaxWorker int JobQueue chan Job // contains filtered or unexported fields }
func NewDispatcher ¶
func NewDispatcher() *Dispatcher
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run(handler JobHandler)
func (*Dispatcher) Stop ¶
func (d *Dispatcher) Stop()
type JobHandler ¶
type JobHandler func(job Job)
Click to show internal directories.
Click to hide internal directories.