workflow

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action string

Action is a type specifying action of an operation

var (
	// ActionTypeUpdate is the action name corresponding to an update operation.
	ActionTypeUpdate Action = "update"

	// ActionTypeRemove is the action name corresponding to a remove operation.
	ActionTypeRemove Action = "remove"

	// ActionTypeSchedule is the action name corresponding to schedule operation.
	ActionTypeSchedule Action = "schedule"
)

type Controller

type Controller struct {
	Scheduler *Scheduler
	// contains filtered or unexported fields
}

Controller represents a type corresponding to workflow manager and controller.

var WorkflowCtrl *Controller = NewController()

WorkflowCtrl is the global instance of the workflow controller running for the API server.

func NewController

func NewController() *Controller

NewController returns a new agent controller manager which manages all the agents running for the API server.

func (*Controller) Configure

func (a *Controller) Configure()

Configure sets up the Agent controller and all its required components.

func (*Controller) Name

func (a *Controller) Name() string

Name returns the name of the agent controller, it is completely defined by the name of the underlying store controller.

func (*Controller) Run

func (a *Controller) Run() error

Run starts running the workflow controller.

func (*Controller) Stop

func (a *Controller) Stop() error

Stop shuts down the controller.

func (*Controller) Type

func (a *Controller) Type() string

Type returns the type of controller configured, for agent this is agent.

type Scheduler

type Scheduler struct {
	// AgentController is for interacting with agent configured for xene.
	AgentController *agent.Controller
	// contains filtered or unexported fields
}

Scheduler is the scheduler used for managing workflows execution on different agent.

func NewSchedulerWithDefaultAgentCtrl

func NewSchedulerWithDefaultAgentCtrl() *Scheduler

NewSchedulerWithDefaultAgentCtrl returns a new wofklow scheduler with the globally configured AgentController.

func (*Scheduler) RemovePipeline

func (s *Scheduler) RemovePipeline(wfName, name string, pipeline *v1alpha1.PipelineSpec,
	status *v1alpha1.WorkflowStatus) error

RemovePipeline removes the scheduled pipeline from an agent.

func (*Scheduler) SchedulePipeline

func (s *Scheduler) SchedulePipeline(wfName, name string, pipeline *v1alpha1.PipelineSpec,
	status *v1alpha1.WorkflowStatus) error

SchedulePipeline finds out an appropriate agent for the pipeline and schedules the run.

func (*Scheduler) UpdatePipeline

func (s *Scheduler) UpdatePipeline(wfName, name string, new *v1alpha1.PipelineSpec,
	status *v1alpha1.WorkflowStatus) error

UpdatePipeline updates the pipeline manifest scheduled on some agent.

Jump to

Keyboard shortcuts

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