(reason configstore.WorkerClaimMissReason, retryAfter time.Duration)
| 37 | } |
| 38 | |
| 39 | func NewWorkerCapacityExhaustedErrorForReason(reason configstore.WorkerClaimMissReason, retryAfter time.Duration) error { |
| 40 | if retryAfter <= 0 { |
| 41 | retryAfter = DefaultWorkerSpawnRetryAfter |
| 42 | } |
| 43 | if reason == configstore.WorkerClaimMissReasonNone { |
| 44 | reason = configstore.WorkerClaimMissReasonNoIdle |
| 45 | } |
| 46 | return &WorkerCapacityExhaustedError{RetryAfter: retryAfter, Reason: reason} |
| 47 | } |
| 48 | |
| 49 | // WorkerPool abstracts the lifecycle and scheduling of Flight SQL workers. |
| 50 | // Two implementations exist: |
no outgoing calls