Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SimplePool ¶
type SimplePool struct {
NumWorkers int
// contains filtered or unexported fields
}
func NewSimplePool ¶
func NewSimplePool(numWorkers int) *SimplePool
func (*SimplePool) AddJob ¶
func (p *SimplePool) AddJob(job Job)
func (*SimplePool) Run ¶
func (p *SimplePool) Run()
func (*SimplePool) Stop ¶
func (p *SimplePool) Stop()
type SimpleWorker ¶
func (SimpleWorker) Start ¶
func (w SimpleWorker) Start()
func (SimpleWorker) Stop ¶
func (w SimpleWorker) Stop()
type WorkerDispatcher ¶
type WorkerDispatcher struct {
WorkerHives map[HiveType]WorkerHive
}
func NewWorkerDispatcher ¶
func NewWorkerDispatcher() *WorkerDispatcher
func (WorkerDispatcher) Dispatch ¶
func (w WorkerDispatcher) Dispatch(hiveType HiveType, jobQueue chan Job, numWorkers int)
func (WorkerDispatcher) GetJobQueue ¶
func (w WorkerDispatcher) GetJobQueue(hiveType HiveType) chan Job
func (WorkerDispatcher) NewWorker ¶
func (w WorkerDispatcher) NewWorker(workerPool chan chan Job) Worker
type WorkerHive ¶
Click to show internal directories.
Click to hide internal directories.