Documentation
¶
Index ¶
Constants ¶
View Source
const ( // DataTransfer dataKey used for loading the transfer from the context. DataTransfer dataKey = iota // PayloadKey to load from the transfer. PayloadKey )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Follower ¶
type Follower interface {
// Start following the Leader.
Start(context.Context)
// Stop following the Leader.
Stop()
}
Follower of the Leader.
func NewFollower ¶
NewFollower creates a new Follower instance.
type Job ¶
type Job interface {
// Payload returns the job's Payload.
Payload() Payload
// Workflow returns the job's to be applied Workflow.
Workflow() Workflow
}
Job definition.
type Leader ¶
type Leader interface {
// Run as fast as he can.
Run(context.Context)
// Stop the running.
Stop()
// AddToFollowersPool an idle follower.
AddToFollowersPool(chan Job)
// ReportCompletion by a Follower.
ReportCompletion()
// ReportError to the error queue.
ReportError(error)
// Wait on the Leader to finish.
Wait()
}
Leader of one or more Follower.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.