Documentation
¶
Overview ¶
Package workflow is the resource module for the node-local Workflow orchestration service — the n8n-style visual workflow engine that executes ReactFlow DAGs in parallel waves.
A workflow is a node graph (definition); an execution is one run of it.
Endpoints (all on the per-tenant node):
GET /api/v2/workflow/workflows
POST /api/v2/workflow/workflows
GET /api/v2/workflow/workflows/{id}
DELETE /api/v2/workflow/workflows/{id}
POST /api/v2/workflow/save
POST /api/v2/workflow/publish
POST /api/v2/workflow/validate
POST /api/v2/workflow/execute
POST /api/v2/workflow/test-node
GET /api/v2/workflow/executions
GET /api/v2/workflow/executions/{id}
POST /api/v2/workflow/executions/{id}/cancel
DELETE /api/v2/workflow/executions/{id}
POST /api/v2/workflow/export/{json|yaml}
GET /api/v2/workflow/health
Index ¶
- type Client
- func (c *Client) CancelExecution(ctx context.Context, executionID string) (Result, error)
- func (c *Client) Create(ctx context.Context, definition map[string]interface{}) (Result, error)
- func (c *Client) Delete(ctx context.Context, workflowID string) (Result, error)
- func (c *Client) DeleteExecution(ctx context.Context, executionID string) (Result, error)
- func (c *Client) Execute(ctx context.Context, payload map[string]interface{}) (Result, error)
- func (c *Client) Export(ctx context.Context, definition map[string]interface{}, format string) (Result, error)
- func (c *Client) Get(ctx context.Context, workflowID string) (Result, error)
- func (c *Client) GetExecution(ctx context.Context, executionID string) (Result, error)
- func (c *Client) Health(ctx context.Context) (Result, error)
- func (c *Client) List(ctx context.Context) (Result, error)
- func (c *Client) ListExecutions(ctx context.Context) (Result, error)
- func (c *Client) Publish(ctx context.Context, definition map[string]interface{}) (Result, error)
- func (c *Client) Save(ctx context.Context, definition map[string]interface{}) (Result, error)
- func (c *Client) TestNode(ctx context.Context, payload map[string]interface{}) (Result, error)
- func (c *Client) Validate(ctx context.Context, definition map[string]interface{}) (Result, error)
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is the entry point. Construct via c.Workflow().
func (*Client) CancelExecution ¶
CancelExecution cancels a running execution.
func (*Client) DeleteExecution ¶
DeleteExecution deletes an execution record.
func (*Client) Execute ¶
Execute runs a workflow. payload is either a full definition or {"workflow_id": "…"} to run a saved workflow.
func (*Client) Export ¶
func (c *Client) Export(ctx context.Context, definition map[string]interface{}, format string) (Result, error)
Export serializes a workflow as "json" or "yaml".
func (*Client) GetExecution ¶
GetExecution returns one execution record.
func (*Client) ListExecutions ¶
ListExecutions returns all workflow executions.