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

Method SetPrepBatch

pocketflow.go:739–742  ·  view source on GitHub ↗

SetPrepBatch sets the function to generate batch parameters.

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

Source from the content-addressed store, hash-verified

737
738// SetPrepBatch sets the function to generate batch parameters.
739func (bf *BatchFlow) SetPrepBatch(f func(ctx *PfContext, params map[string]any) ([]map[string]any, error)) *BatchFlow {
740 bf.PrepBatchFunc = f
741 return bf
742}
743
744// SetPostBatch sets the function to run after all batches complete.
745func (bf *BatchFlow) SetPostBatch(f func(ctx *PfContext, params map[string]any, batchPrepResult []map[string]any) (string, error)) *BatchFlow {

Callers 1

TestBatchFlowExecutionFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestBatchFlowExecutionFunction · 0.76