package
Version:
v1.5.0
Opens a new window with list of versions in this module.
Published: Jun 30, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 9
Opens a new window with list of imports.
Imported by: 9
Opens a new window with list of known importers.
Documentation
¶
Init initializes global parameters of dispatchers by configuration values.
Configuration keys prefixed by "dispatch_" are considered.
Config contains information to create a dispatcher instance.
Start creates and starts a new dispatcher instance with the current
configuration.
The instance watches a queue specified by q in a way specified by
m.
type Dispatcher interface {
Stats() *Stats
PollingInterval() uint
MaxWorkers() uint
MaxDispatchesPerSecond() float64
MaxBurstSize() int
Ping()
Stop() <-chan struct{}
}
Dispatcher is an interface of dispatchers for some queue.
Start creates and starts a new dispatcher instance with the default
configuration.
JobQueue is an interface of a queue which can be watched by
dispatchers.
type Stats struct {
OutstandingJobs int64 `json:"outstanding_jobs"`
TotalWorkers int64 `json:"total_workers"`
IdleWorkers int64 `json:"idle_workers"`
}
Stats contains statistics of a dispatcher.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.