Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Engine ¶
type Engine interface { // Start starts the engine with the given context Start(ctx context.Context) error // Stop stops the engine Stop() error }
Engine represents the behavior of the Nerif Network automation workflow engine
func New ¶
func New(logger logrus.FieldLogger, registry WorkflowRegistry, broadcaster broadcaster.Broadcaster, executor executor.Executor) Engine
New is the constructor of defaultEngine
type WorkflowRegistry ¶
type WorkflowRegistry interface { // ListWorkflows returns the list of workflows that are ready to be served. // This function is used on the engine startup in order to load workflows for surving. ListWorkflows(ctx context.Context) ([]workflow.Workflow, error) // StartWorkflow returns a channel to listen for new workflows to start. // This function is called on the engine startup in order to start listening for new workflows be to served. StartWorkflow() <-chan workflow.Workflow // StopWorkflow returns a channel to listen for workflows to stop. // This function is called on the engine startup in order to start listening for workflow IDs which should be stopped. StopWorkflow() <-chan string }
WorkflowRegistry represents a behavior of the automation workflow registry
Click to show internal directories.
Click to hide internal directories.