node

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EndNode

func EndNode(node *workflow.Node) (*endNode, error)

EndNode initializes new end node with end definition

func ExclGateway

func ExclGateway(node *wf.Node, outgoing ...*wf.Edge) (*exclGateway, error)

ExclGateway fn initializes exclusive gateway func ExclGateway(pp ...*GatewayCondition) (*exclGateway, error) {

func ExprNode

func ExprNode(n *workflow.Node) *exprNode

ExprNode 创建expr node

func ForkGateway

func ForkGateway(node *wf.Node, outgoing ...*wf.Edge) (*forkGateway, error)

ForkGateway fn initializes fork gateway

func LLMNode

func LLMNode(n *workflow.Node) *llmNode

LLMNode 创建LLMNode

func StartNode

func StartNode(n *workflow.Node) *startNode

StartNode initializes new start node with start definition

func ToolNode

func ToolNode(node *workflow.Node) (*toolNode, error)

ToolNode initializes new function node with function definition and configured arguments and results

Types

type ExecRequest

type ExecRequest struct {
	ProcessID  string
	WorkflowID string
	NodeID     string
	Sponsor    string
	Runner     string // 运行人
	Inputs     map[string]any
	Scope      map[string]any
	// Graph      *dag.Graph
	Events chan *workflow.Event
}

type ExecResponse

type ExecResponse any

func ForkGatewayActivity

func ForkGatewayActivity(ctx context.Context, n *forkGateway, r *ExecRequest) (ExecResponse, error)

ForkGatewayActivity TODO

func GatewayActivity

func GatewayActivity(ctx context.Context, n *exclGateway, r *ExecRequest) (ExecResponse, error)

GatewayActivity TODO

type Identifier

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

Identifier TODO

func (*Identifier) ID

func (i *Identifier) ID() string

ID TODO

func (*Identifier) SetID

func (i *Identifier) SetID(id string)

SetID TODO

type Node

type Node interface {
	ID() string
	SetID(string)
	Execute(context.Context, *ExecRequest) (ExecResponse, error)
}

Node TODO

func Build

func Build(n *workflow.Node, outgoing ...*workflow.Edge) (Node, error)

Build 根据节点类型构建节点

type Nodes

type Nodes []Node

Nodes TODO

type VDBNode

type VDBNode struct {
}

VDBNode ...

func NewVDBNode

func NewVDBNode(n *workflow.Node) *VDBNode

NewVDBNode 创建VDBNode

func (*VDBNode) Execute

func (n *VDBNode) Execute(ctx context.Context, r *ExecRequest) (ExecResponse, error)

Execute 执行VDBNode

Jump to

Keyboard shortcuts

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