Versions in this module Expand all Collapse all v0 v0.3.1 Mar 29, 2016 Changes in this version + type Dispatcher struct + JobQueue chan Job + func NewDispatcher(maxWorkers int, queueBufferSize int) *Dispatcher + func NewDispatcherWG(maxWorkers int, queueBufferSize int, exWg *sync.WaitGroup) *Dispatcher + func (d *Dispatcher) GetQueueSize() int + func (d *Dispatcher) Run() + func (d *Dispatcher) RunWithLimiter(limiterGap time.Duration) + func (d *Dispatcher) Stop() + func (d *Dispatcher) SubmitJob(job Job) + type Job struct + ID string + Payload *interface{} + TargetFunc string + Type JobType + func NewJob(jobType JobType, payload interface{}, targetFunc string) Job + type JobType int + const MESSAGE + const TASK + type Worker struct + JobChannel chan Job + WorkerPool chan chan Job + func NewWorker(workerPool chan chan Job) Worker + func NewWorkerWG(workerPool chan chan Job, wg *sync.WaitGroup) Worker + func (w *Worker) Run() + func (w *Worker) Stop() bool