Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Builder ¶
type Builder struct {
// contains filtered or unexported fields
}
Builder constructs a Flow fluently in Go, as an alternative to parsing JSON. Use the node constructors in pkg/node (node.NewRequest, node.NewDelay, ...).
f := flow.NewBuilder("provision").Version("1.0").
Input("baseURL", "https://api.example.com").
Add(node.NewRequest("create").POST("{{baseURL}}/customers")).
Add(node.NewRequest("provision").POST("{{baseURL}}/workspaces")).
Edge("create", "provision").
Build()
func NewBuilder ¶
NewBuilder starts a flow with the given name (version defaults to "1.0").
type Flow ¶
type Flow struct {
Name string `json:"name"`
Description string `json:"description"`
Version string `json:"version"`
Nodes []node.AnyNode `json:"-"`
Edges []edge.Edge `json:"edges"`
InitialInputs map[string]any `json:"initialInputs"`
}
func ParseFromJSON ¶
func ParseFromJSONWithOptions ¶
func ParseFromJSONWithOptions(data []byte, options ParseOptions) (*Flow, error)
type ParseOptions ¶
type ReferencedFlow ¶
type ReferencedFlow struct {
FlowDefinition json.RawMessage `json:"flow_definition"`
InputOverrides map[string]any `json:"input_overrides,omitempty"`
}
ReferencedFlow contains the extra flow definitions the runner can execute from module nodes without calling back into the control plane at runtime.
func (*ReferencedFlow) UnmarshalJSON ¶
func (r *ReferencedFlow) UnmarshalJSON(data []byte) error
type ReferencedFlowRegistry ¶
type ReferencedFlowRegistry map[string]ReferencedFlow
ReferencedFlowRegistry stores module targets by flow ID.
Click to show internal directories.
Click to hide internal directories.