builder

package
v0.0.0-...-bea47b1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: MIT Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMermaid

func ToMermaid(wf *models.Workflow) string

ToMermaid generates a Mermaid.js flowchart representation of the workflow.

Types

type NodeBuilder

type NodeBuilder struct {
	// contains filtered or unexported fields
}

func (*NodeBuilder) If

func (nb *NodeBuilder) If(targetID string, condition string) *NodeBuilder

func (*NodeBuilder) Then

func (nb *NodeBuilder) Then(targetID string) *NodeBuilder

func (*NodeBuilder) WithConfig

func (nb *NodeBuilder) WithConfig(key string, value interface{}) *NodeBuilder

func (*NodeBuilder) WithRetry

func (nb *NodeBuilder) WithRetry(count int) *NodeBuilder

func (*NodeBuilder) WithSaga

func (nb *NodeBuilder) WithSaga(compensateNodeID string) *NodeBuilder

type WorkflowBuilder

type WorkflowBuilder struct {
	// contains filtered or unexported fields
}

func NewWorkflow

func NewWorkflow(id, name string) *WorkflowBuilder

func (*WorkflowBuilder) AddNode

func (b *WorkflowBuilder) AddNode(id, nodeType string) *NodeBuilder

func (*WorkflowBuilder) Build

func (b *WorkflowBuilder) Build() *models.Workflow

func (*WorkflowBuilder) Connect

func (b *WorkflowBuilder) Connect(sourceID, targetID string) *WorkflowBuilder

func (*WorkflowBuilder) ConnectIf

func (b *WorkflowBuilder) ConnectIf(sourceID, targetID string, condition string) *WorkflowBuilder

func (*WorkflowBuilder) Visualise

func (b *WorkflowBuilder) Visualise() string

Jump to

Keyboard shortcuts

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