Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var WorkQueue = make(chan Work, 100)
WorkQueue is the global queue of work to dispatch
View Source
var WorkerQueue chan chan Work
WorkerQueue is the global queue of Workers
Functions ¶
func StartDispatcher ¶
func StartDispatcher(nworkers int)
StartDispatcher is charged to start n workers.
Types ¶
type ChanWriter ¶
type ChanWriter struct {
ByteChan chan []byte
}
ChanWriter is a simple writer to a channel of byte.
type Work ¶ added in v1.15.0
type Work interface {
ID() uint64
Name() string
Run() error
Close()
SendMessage(message string)
Logs(filter string) string
StatusLabel() string
Err() error
}
Work is a dispatched work given to a worker
Click to show internal directories.
Click to hide internal directories.