Documentation ¶
Index ¶
- Constants
- Variables
- func InitWorkflowMirrorPlugin(mgr Manager)
- type Job
- func (n *Job) GetControlPolicy() flow.ControlPolicy
- func (n *Job) GetHooks() flow.Hooks
- func (n *Job) GetMessage() string
- func (n *Job) GetStatus() fsm.Status
- func (n *Job) ID() flow.FID
- func (n *Job) NextBatch(ctx *flow.Context) ([]flow.Task, error)
- func (n *Job) SetMessage(msg string)
- func (n *Job) SetStatus(status fsm.Status)
- func (n *Job) SetStepStatus(stepName flow.TName, status fsm.Status)
- func (n *Job) Setup(ctx *flow.Context) error
- func (n *Job) Teardown(ctx *flow.Context)
- func (n *Job) Type() flow.FType
- type JobStep
- func (n *JobStep) Do(ctx *flow.Context) error
- func (n *JobStep) GetMessage() string
- func (n *JobStep) GetStatus() fsm.Status
- func (n *JobStep) Name() flow.TName
- func (n *JobStep) SetMessage(msg string)
- func (n *JobStep) SetStatus(status fsm.Status)
- func (n *JobStep) Setup(ctx *flow.Context) error
- func (n *JobStep) Teardown(ctx *flow.Context)
- type Manager
- type MirrorPlugin
- type Runner
- func (r *Runner) DeleteFlow(flowId flow.FID) error
- func (r *Runner) DeleteTask(flowId flow.FID, taskName flow.TName) error
- func (r *Runner) GetFlow(flowId flow.FID) (flow.Flow, error)
- func (r *Runner) GetFlowMeta(flowId flow.FID) (*flowstorage.FlowMeta, error)
- func (r *Runner) SaveFlow(flow flow.Flow) error
- func (r *Runner) SaveTask(flowId flow.FID, task flow.Task) error
- func (r *Runner) Start(stopCh chan struct{}) error
- func (r *Runner) WorkFlowHandler(ctx context.Context, wf *types.WorkflowSpec) (*types.WorkflowJob, error)
Constants ¶
View Source
const ( MirrorPluginName = "workflow" MirrorPluginVersion = "1.0" )
Variables ¶
View Source
var (
ErrJobNotFound = errors.New("job not found")
)
Functions ¶
func InitWorkflowMirrorPlugin ¶
func InitWorkflowMirrorPlugin(mgr Manager)
Types ¶
type Job ¶
type Job struct { *types.WorkflowJob // contains filtered or unexported fields }
func (*Job) GetControlPolicy ¶
func (n *Job) GetControlPolicy() flow.ControlPolicy
func (*Job) GetMessage ¶
func (*Job) SetMessage ¶
type JobStep ¶
type JobStep struct { *types.WorkflowJobStep // contains filtered or unexported fields }
func (*JobStep) GetMessage ¶
func (*JobStep) SetMessage ¶
type Manager ¶
type Manager interface { ListWorkflows(ctx context.Context) ([]*types.WorkflowSpec, error) GetWorkflow(ctx context.Context, wfId string) (*types.WorkflowSpec, error) SaveWorkflow(ctx context.Context, spec *types.WorkflowSpec) (*types.WorkflowSpec, error) DeleteWorkflow(ctx context.Context, wfId string) error ListJobs(ctx context.Context, wfId string) ([]*types.WorkflowJob, error) TriggerWorkflow(ctx context.Context, wfId string) (*types.WorkflowJob, error) PauseWorkflowJob(ctx context.Context, jobId string) error ResumeWorkflowJob(ctx context.Context, jobId string) error CancelWorkflowJob(ctx context.Context, jobId string) error }
func NewManager ¶
func NewManager(recorder metastore.ScheduledTaskRecorder) (Manager, error)
type MirrorPlugin ¶
type MirrorPlugin struct {
Manager
}
func (*MirrorPlugin) Name ¶
func (w *MirrorPlugin) Name() string
func (*MirrorPlugin) Type ¶
func (w *MirrorPlugin) Type() types.PluginType
func (*MirrorPlugin) Version ¶
func (w *MirrorPlugin) Version() string
type Runner ¶
type Runner struct { *flowcontroller.FlowController sync.RWMutex // contains filtered or unexported fields }
func InitWorkflowRunner ¶
func InitWorkflowRunner(recorder metastore.ScheduledTaskRecorder) (*Runner, error)
func (*Runner) GetFlowMeta ¶
func (*Runner) WorkFlowHandler ¶
func (r *Runner) WorkFlowHandler(ctx context.Context, wf *types.WorkflowSpec) (*types.WorkflowJob, error)
Click to show internal directories.
Click to hide internal directories.