controller

package
v0.0.0-...-98ba599 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxRuntime = 10 * time.Minute
)
View Source
const (
	EventRefresh = "refresh"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type InvocationController

type InvocationController struct {
	StateStore *expr.Store // Future: just grab the initial state of the parent, instead of constantly rebuilding it.
	// contains filtered or unexported fields
}

InvocationController is the controller for ensuring the processing of a single workflow invocation.

func NewInvocationController

func NewInvocationController(invocationID string, executor *executor.LocalExecutor, invocationAPI *api.Invocation,
	taskAPI *api.Task, scheduler *scheduler.InvocationScheduler, stateStore *expr.Store,
	span opentracing.Span, logger *logrus.Entry) *InvocationController

func (*InvocationController) Eval

func (c *InvocationController) Eval(ctx context.Context, processValue *ctrl.Event) ctrl.Result

type InvocationMetaController

type InvocationMetaController struct {
	// contains filtered or unexported fields
}

InvocationMetaController is the component responsible for the full integration of the invocations reconciliation loop.

Specifically, the meta-controller is responsible for the following: - It starts or registers the sensors to ensure that events are routed to this control system. - It manages all of the workflow controllers. - It provides an executor pool for controllers to submit their tasks to.

func NewInvocationMetaController

func NewInvocationMetaController(executor *executor.LocalExecutor, invocations *store.Invocations,
	invocationAPI *api.Invocation, taskAPI *api.Task, scheduler *scheduler.InvocationScheduler, stateStore *expr.Store,
	cachePollInterval time.Duration) *InvocationMetaController

func (*InvocationMetaController) Close

func (c *InvocationMetaController) Close() error

func (*InvocationMetaController) Run

func (c *InvocationMetaController) Run()

type InvocationNotificationSensor

type InvocationNotificationSensor struct {
	// contains filtered or unexported fields
}

InvocationNotificationSensor watches the invocations store notifications for workflow events.

func NewInvocationNotificationSensor

func NewInvocationNotificationSensor(invocations *store.Invocations) *InvocationNotificationSensor

func (*InvocationNotificationSensor) Close

func (*InvocationNotificationSensor) Run

func (s *InvocationNotificationSensor) Run(evalQueue ctrl.EvalQueue)

func (*InvocationNotificationSensor) Start

func (s *InvocationNotificationSensor) Start(evalQueue ctrl.EvalQueue) error

type InvocationStorePollSensor

type InvocationStorePollSensor struct {
	*ctrl.PollSensor
	// contains filtered or unexported fields
}

InvocationStorePollSensor polls the invocations store on a set interval.

func NewInvocationStorePollSensor

func NewInvocationStorePollSensor(invocations *store.Invocations, interval time.Duration) *InvocationStorePollSensor

func (*InvocationStorePollSensor) Poll

func (s *InvocationStorePollSensor) Poll(evalQueue ctrl.EvalQueue)

type StalenessPollSensor

type StalenessPollSensor struct {
	*ctrl.PollSensor
	// contains filtered or unexported fields
}

func NewStalenessPollSensor

func NewStalenessPollSensor(system *ctrl.System, stateFetcher func(ctrlKey string) (fes.Aggregate, fes.Entity, error),
	interval time.Duration, maxStaleness time.Duration) *StalenessPollSensor

func (*StalenessPollSensor) Poll

func (s *StalenessPollSensor) Poll(queue ctrl.EvalQueue)

type WorkflowController

type WorkflowController struct {
	// contains filtered or unexported fields
}

WorkflowController is the controller for ensuring the processing of a single workflow.

func NewWorkflowController

func NewWorkflowController(api *api.Workflow, executor *executor.LocalExecutor, workflowID string) *WorkflowController

func (*WorkflowController) Eval

func (c *WorkflowController) Eval(ctx context.Context, processValue *ctrl.Event) ctrl.Result

type WorkflowMetaController

type WorkflowMetaController struct {
	// contains filtered or unexported fields
}

WorkflowMetaController is the component responsible for the full integration of the workflows reconciliation loop.

Specifically, the meta-controller is responsible for the following: - It starts or registers the sensors to ensure that events are routed to this control system. - It manages all of the workflow controllers. - It provides an executor pool for controllers to submit their tasks to.

func NewWorkflowMetaController

func NewWorkflowMetaController(api *api.Workflow, workflows *store.Workflows, executor *executor.LocalExecutor,
	storePollInterval time.Duration) *WorkflowMetaController

func (*WorkflowMetaController) Close

func (c *WorkflowMetaController) Close() error

func (*WorkflowMetaController) Run

func (c *WorkflowMetaController) Run()

type WorkflowNotificationSensor

type WorkflowNotificationSensor struct {
	// contains filtered or unexported fields
}

WorkflowNotificationSensor watches the workflow store notifications for workflow events.

func NewWorkflowNotificationSensor

func NewWorkflowNotificationSensor(workflows *store.Workflows) *WorkflowNotificationSensor

func (*WorkflowNotificationSensor) Close

func (s *WorkflowNotificationSensor) Close() error

func (*WorkflowNotificationSensor) Run

func (s *WorkflowNotificationSensor) Run(evalQueue ctrl.EvalQueue)

func (*WorkflowNotificationSensor) Start

func (s *WorkflowNotificationSensor) Start(evalQueue ctrl.EvalQueue) error

type WorkflowStorePollSensor

type WorkflowStorePollSensor struct {
	*ctrl.PollSensor
	// contains filtered or unexported fields
}

WorkflowStorePollSensor polls the workflows store on a set interval.

func NewWorkflowStorePollSensor

func NewWorkflowStorePollSensor(workflows *store.Workflows, interval time.Duration) *WorkflowStorePollSensor

func (*WorkflowStorePollSensor) Poll

func (s *WorkflowStorePollSensor) Poll(evalQueue ctrl.EvalQueue)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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