workflow

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildInWorkflowSummary = "buildin.summary"
	BuildInWorkflowIngest  = "buildin.ingest"
	BuildInWorkflowWebpack = "buildin.webpack"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CronHandler

type CronHandler struct {
	*cron.Cron
	// contains filtered or unexported fields
}

func (*CronHandler) Register

func (c *CronHandler) Register(wf *types.WorkflowSpec) error

func (*CronHandler) Start

func (c *CronHandler) Start(ctx context.Context)

func (*CronHandler) Unregister

func (c *CronHandler) Unregister(wfID string)

type JobAttr

type JobAttr struct {
	JobID   string
	Reason  string
	Queue   string
	Timeout time.Duration
}

type Manager

type Manager interface {
	Start(stopCh chan struct{})

	ListWorkflows(ctx context.Context) ([]*types.WorkflowSpec, error)
	GetWorkflow(ctx context.Context, wfId string) (*types.WorkflowSpec, error)
	CreateWorkflow(ctx context.Context, spec *types.WorkflowSpec) (*types.WorkflowSpec, error)
	UpdateWorkflow(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)
	GetJob(ctx context.Context, wfId string, jobID string) (*types.WorkflowJob, error)

	TriggerWorkflow(ctx context.Context, wfId string, tgt types.WorkflowTarget, attr JobAttr) (*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(entryMgr dentry.Manager, docMgr document.Manager, notify *notify.Notify, recorder metastore.ScheduledTaskRecorder, cfg config.Loader) (Manager, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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