function
ValidateTaskLeaseDuration
Validate an operationally bounded task lease.
Arguments
| Argument | Type | Description |
|---|---|---|
duration | time.Duration | A whole-millisecond duration from one millisecond through MaxTaskLeaseDuration. |
Returns
Nil when valid or a bounded, actionable contract error.
errorHow it works
Custom TaskStore implementations should call this at their direct public boundary and still enforce the corresponding database invariants atomically.
Full signature
func ValidateTaskLeaseDuration(duration time.Duration) error