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

Method SetPrep

pocketflow.go:389–392  ·  view source on GitHub ↗

SetPrep sets the PrepFunc. Expects a function returning []any.

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

Source from the content-addressed store, hash-verified

387
388// SetPrep sets the PrepFunc. Expects a function returning []any.
389func (bn *BatchNode) SetPrep(f func(ctx *PfContext, params map[string]any) ([]any, error)) *BatchNode {
390 bn.PrepFunc = f
391 return bn
392}
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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected