Documentation ¶
Index ¶
- Constants
- Variables
- func CollectQSizeOption(v uint) workManagerOption
- func CollectWkrSizeOption(v uint) workManagerOption
- func New(opts ...workManagerOption) *scheduler
- func ProcessQSizeOption(v uint) workManagerOption
- func ProcessWkrSizeOption(v uint) workManagerOption
- func PublishQSizeOption(v uint) workManagerOption
- func PublishWkrSizeOption(v uint) workManagerOption
- type TaskWatcher
- type WorkflowState
Constants ¶
View Source
const ( DefaultDeadlineDuration = time.Second * 5 DefaultStopOnFailure = 3 )
Variables ¶
View Source
var ( HandlerRegistrationName = "scheduler" ErrMetricManagerNotSet = errors.New("MetricManager is not set.") ErrSchedulerNotStarted = errors.New("Scheduler is not started.") ErrTaskAlreadyRunning = errors.New("Task is already running.") ErrTaskAlreadyStopped = errors.New("Task is already stopped.") )
View Source
var ( ErrTaskNotFound = errors.New("Task not found") ErrTaskNotStopped = errors.New("Task must be stopped") ErrTaskHasAlreadyBeenAdded = errors.New("Task has already been added") ErrTaskDisabledOnFailures = errors.New("Task disabled due to consecutive failures") ErrTaskNotDisabled = errors.New("Task must be disabled") )
View Source
var ( WorkflowStateLookup = map[WorkflowState]string{ WorkflowStopped: "Stopped", WorkflowStarted: "Started", } ErrNullCollectNode = errors.New("Missing collection node in workflow map") ErrNoMetricsInCollectNode = errors.New("Collection node has not metrics defined to collect") )
Functions ¶
func CollectQSizeOption ¶
func CollectQSizeOption(v uint) workManagerOption
func CollectWkrSizeOption ¶
func CollectWkrSizeOption(v uint) workManagerOption
func New ¶
func New(opts ...workManagerOption) *scheduler
New returns an instance of the scheduler The MetricManager must be set before the scheduler can be started. The MetricManager must be started before it can be used.
func ProcessQSizeOption ¶
func ProcessQSizeOption(v uint) workManagerOption
func ProcessWkrSizeOption ¶
func ProcessWkrSizeOption(v uint) workManagerOption
func PublishQSizeOption ¶
func PublishQSizeOption(v uint) workManagerOption
func PublishWkrSizeOption ¶
func PublishWkrSizeOption(v uint) workManagerOption
Types ¶
type TaskWatcher ¶
type TaskWatcher struct {
// contains filtered or unexported fields
}
func (*TaskWatcher) Close ¶
func (t *TaskWatcher) Close() error
Stops watching a task. Cannot be restarted.
type WorkflowState ¶
type WorkflowState int
const ( WorkflowStopped WorkflowState = iota WorkflowStarted )
Source Files ¶
Click to show internal directories.
Click to hide internal directories.