Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct {
// JobQueue A buffered channel that we can send work requests on.
JobQueue chan Job
// A pool of workers channels that are registered with the dispatcher
WorkerPool chan chan Job
// Len represents num of worker
Len int
}
Dispatcher -> Processing Data
func NewDispatcher ¶
func NewDispatcher(maxWorkers int) *Dispatcher
NewDispatcher represents Processing Data
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.