scheduler

package
v0.8.0-beta Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2015 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

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
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL