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

Method Prep

pocketflow.go:424–430  ·  view source on GitHub ↗

Prep calls the user-defined PrepFunc.

(ctx *PfContext)

Source from the content-addressed store, hash-verified

422
423// Prep calls the user-defined PrepFunc.
424func (bn *BatchNode) Prep(ctx *PfContext) (any, error) {
425 if bn.PrepFunc == nil {
426 return nil, nil
427 }
428 // Prep returns the slice directly (as 'any')
429 return bn.PrepFunc(ctx, bn.params)
430}
431
432// Exec iterates through the prepResult slice, calling ExecItemFunc for each item with retries.
433func (bn *BatchNode) Exec(ctx *PfContext, prepResult any) (any, error) {

Callers 1

InternalRunMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected