SetRetry configures retry behaviour.
(maxRetries int, waitMilliseconds time.Duration)
| 214 | |
| 215 | // SetRetry configures retry behaviour. |
| 216 | func (n *Node) SetRetry(maxRetries int, waitMilliseconds time.Duration) *Node { |
| 217 | if maxRetries < 1 { |
| 218 | panic("maxRetries must be at least 1") |
| 219 | } |
| 220 | if waitMilliseconds < 0 { |
| 221 | panic("waitMilliseconds cannot be negative") |
| 222 | } |
| 223 | n.MaxRetries = maxRetries |
| 224 | n.WaitMilliseconds = waitMilliseconds |
| 225 | return n |
| 226 | } |
| 227 | |
| 228 | // SetPrep sets the PrepFunc. |
| 229 | func (n *Node) SetPrep(f func(ctx *PfContext, params map[string]any) (any, error)) *Node { |
no outgoing calls