Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + const Parallel + const Sequential + func AvailableFactories() map[string]bool + func Register(factoryName string, factory Factory) + func StartManager(m *Manager) (*sync.WaitGroup, context.Context, context.CancelFunc) + func Unregister(name string) + func VerifyAllTasksDone(ctx context.Context, ts *topo.Server, uuid string) error + type Action struct + Message string + Name string + State ActionState + Style ActionStyle + type ActionListener interface + Action func(ctx context.Context, path, name string) error + type ActionParameters struct + Name string + Path string + type ActionState int + const ActionStateDisabled + const ActionStateEnabled + const ActionStateUnknown + type ActionStyle int + const ActionStyleNormal + const ActionStyleTriggered + const ActionStyleUnknown + const ActionStyleWaiting + const ActionStyleWarning + type CheckpointWriter struct + func NewCheckpointWriter(ts *topo.Server, checkpoint *workflowpb.WorkflowCheckpoint, ...) *CheckpointWriter + func (c *CheckpointWriter) UpdateTask(taskID string, status workflowpb.TaskState, err error) error + type Factory interface + Init func(m *Manager, w *workflowpb.Workflow, args []string) error + Instantiate func(m *Manager, w *workflowpb.Workflow, rootNode *Node) (Workflow, error) + type Manager struct + func NewManager(ts *topo.Server) *Manager + func (m *Manager) Create(ctx context.Context, factoryName string, args []string) (string, error) + func (m *Manager) Delete(ctx context.Context, uuid string) error + func (m *Manager) HandleHTTPLongPolling(pattern string) + func (m *Manager) HandleHTTPWebSocket(pattern string) + func (m *Manager) NodeManager() *NodeManager + func (m *Manager) Run(ctx context.Context) + func (m *Manager) SetRedirectFunc(rf func() (string, error)) + func (m *Manager) Start(ctx context.Context, uuid string) error + func (m *Manager) Stop(ctx context.Context, uuid string) error + func (m *Manager) TopoServer() *topo.Server + func (m *Manager) Wait(ctx context.Context, uuid string) error + func (m *Manager) WaitUntilRunning() + func (m *Manager) WorkflowForTesting(uuid string) (Workflow, error) + func (m *Manager) WorkflowInfoForTesting(uuid string) (*topo.WorkflowInfo, error) + type Node struct + Actions []*Action + Children []*Node + CreateTime int64 + Disabled bool + Display NodeDisplay + LastChanged int64 + Listener ActionListener + Log string + Message string + Name string + Path string + PathName string + Progress int + ProgressMessage string + State workflowpb.WorkflowState + func NewNode() *Node + func (n *Node) BroadcastChanges(updateChildren bool) error + func (n *Node) GetChildByPath(subPath string) (*Node, error) + type NodeDisplay int + const NodeDisplayDeterminate + const NodeDisplayIndeterminate + const NodeDisplayNone + const NodeDisplayUnknown + type NodeManager struct + func NewNodeManager() *NodeManager + func (m *NodeManager) Action(ctx context.Context, ap *ActionParameters) error + func (m *NodeManager) AddRootNode(n *Node) error + func (m *NodeManager) CloseWatcher(i int) + func (m *NodeManager) GetAndWatchFullTree(notifications chan []byte) ([]byte, int, error) + func (m *NodeManager) GetFullTree() ([]byte, error) + func (m *NodeManager) RemoveRootNode(n *Node) + type ParallelRunner struct + func NewParallelRunner(ctx context.Context, rootUINode *Node, cp *CheckpointWriter, ...) *ParallelRunner + func (p *ParallelRunner) Action(ctx context.Context, path, name string) error + func (p *ParallelRunner) Run() error + type PhaseType string + type SleepWorkflow struct + func (sw *SleepWorkflow) Action(ctx context.Context, path, name string) error + func (sw *SleepWorkflow) Run(ctx context.Context, manager *Manager, wi *topo.WorkflowInfo) error + type SleepWorkflowData struct + Duration int + Paused bool + Slept int + type SleepWorkflowFactory struct + func (f *SleepWorkflowFactory) Init(_ *Manager, w *workflowpb.Workflow, args []string) error + func (f *SleepWorkflowFactory) Instantiate(_ *Manager, w *workflowpb.Workflow, rootNode *Node) (Workflow, error) + type Update struct + Deletes []string + FullUpdate bool + Index int + Nodes []*Node + Redirect string + type Workflow interface + Run func(ctx context.Context, manager *Manager, wi *topo.WorkflowInfo) error