SetRetry configures retry behaviour.
(maxRetries int, waitMilliseconds time.Duration)
| 374 | |
| 375 | // SetRetry configures retry behaviour. |
| 376 | func (bn *BatchNode) SetRetry(maxRetries int, waitMilliseconds time.Duration) *BatchNode { |
| 377 | if maxRetries < 1 { |
| 378 | panic("maxRetries must be at least 1") |
| 379 | } |
| 380 | if waitMilliseconds < 0 { |
| 381 | panic("waitMilliseconds cannot be negative") |
| 382 | } |
| 383 | bn.MaxRetries = maxRetries |
| 384 | bn.WaitMilliseconds = waitMilliseconds |
| 385 | return bn |
| 386 | } |
| 387 | |
| 388 | // SetPrep sets the PrepFunc. Expects a function returning []any. |
| 389 | func (bn *BatchNode) SetPrep(f func(ctx *PfContext, params map[string]any) ([]any, error)) *BatchNode { |
nothing calls this directly
no outgoing calls
no test coverage detected