Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JobQueue chan Job
JobQueue a buffered channel that we can send work requests on.
Functions ¶
This section is empty.
Types ¶
type Dispatcher ¶
type Dispatcher struct { // A pool of workers channels that are registered with the dispatcher WorkerPool chan chan Job // contains filtered or unexported fields }
Dispatcher struct of workers channels
func NewDispatcher ¶
func NewDispatcher(maxWorkers int) *Dispatcher
NewDispatcher create new dispatcher
type Job ¶
type Job struct { DB *db.DB Message *sarama.ConsumerMessage }
Job represents the job to be run
func (*Job) InsertIntoDB ¶
InsertIntoDB insert received data into database
Click to show internal directories.
Click to hide internal directories.