mirror of
https://github.com/open-gitagent/langship.sh.git
synced 2026-08-03 07:21:04 +02:00
16 lines
563 B
Go
16 lines
563 B
Go
package engine
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/lyzrai/flow/pkg/models"
|
|
)
|
|
|
|
// NodeExecutorFunc is the signature for executing a single node.
|
|
// Each registered node type provides one of these.
|
|
type NodeExecutorFunc func(ctx context.Context, node models.NodeDef, inputs [][]models.Item, execCtx *ExecutionContext) (map[int][]models.Item, error)
|
|
|
|
// ExecutorLookup resolves a node type string to a node executor function.
|
|
// The runner uses this to dispatch each node to its registered handler.
|
|
type ExecutorLookup func(nodeType string) (NodeExecutorFunc, error)
|