MCPcopy Create free account
hub / github.com/The-Pocket/PocketFlow-Go / SetExecItem

Method SetExecItem

pocketflow.go:395–398  ·  view source on GitHub ↗

SetExecItem sets the ExecItemFunc for processing individual items.

(f func(ctx *PfContext, params map[string]any, item any) (any, error))

Source from the content-addressed store, hash-verified

393
394// SetExecItem sets the ExecItemFunc for processing individual items.
395func (bn *BatchNode) SetExecItem(f func(ctx *PfContext, params map[string]any, item any) (any, error)) *BatchNode {
396 bn.ExecItemFunc = f
397 return bn
398}
399
400// SetPost sets the PostFunc. Receives []any prep and []any exec results.
401func (bn *BatchNode) SetPost(f func(ctx *PfContext, params map[string]any, prepResult []any, execResult []any) (string, error)) *BatchNode {

Callers 1

Calls

no outgoing calls

Tested by 1