Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var JobQueue chan Job
A buffered channel that we can send work requests on.
Functions ¶
This section is empty.
Types ¶
type ArticleNotice ¶
type ArticleNotice struct {
OpenID string
Title string
Description string
PicURL string
URL string
}
ArticleNotice struct
type Dispatcher ¶
type Dispatcher struct {
// A pool of workers channels that are registered with the dispatcher
MaxWorkers int
WorkerPool chan chan Job
}
func NewDispatcher ¶
func NewDispatcher(maxWorkers int) *Dispatcher
func (*Dispatcher) Run ¶
func (d *Dispatcher) Run()
type EmailNotice ¶
EmailNotice struct
type NoticeDemo ¶
NoticeDemo struct
type TextNotice ¶
TextNotice struct
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.