Documentation
¶
Overview ¶
Package coordinator coordinates the running of Labors within the system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
Coordinator handles coordination of executing Labors.
func (*Coordinator) Add ¶
func (c *Coordinator) Add(l *work.Labor) error
Add adds a Labor for processsing. Processing begins immediately if the state is set to NotStarted. If set to AdminNotStarted, Start() must be called to begin execution.
func (*Coordinator) Labor ¶
func (c *Coordinator) Labor(id string) (*work.Labor, error)
Labor returns a running Labor.
func (*Coordinator) Signal ¶
func (c *Coordinator) Signal(id string, signal work.Signal) error
Signal signals a Labor (Pause/Stop/Unpause/...).
func (*Coordinator) Start ¶
func (c *Coordinator) Start(id string) error
Start begins processing of a Labor in the AdminNotStarted state.
Click to show internal directories.
Click to hide internal directories.