DispatchTaskStore manages the shared distributed dispatch queue.
| 112 | |
| 113 | // DispatchTaskStore manages the shared distributed dispatch queue. |
| 114 | type DispatchTaskStore interface { |
| 115 | Enqueue(ctx context.Context, task *DispatchTask) error |
| 116 | ClaimNext(ctx context.Context, claim DispatchTaskClaim) (*ClaimedDispatchTask, error) |
| 117 | GetClaim(ctx context.Context, claimToken string) (*ClaimedDispatchTask, error) |
| 118 | ReleaseClaim(ctx context.Context, claimToken string) error |
| 119 | DeleteClaim(ctx context.Context, claimToken string) error |
| 120 | CountOutstandingByQueue(ctx context.Context, queueName string, claimTimeout time.Duration) (int, error) |
| 121 | HasOutstandingAttempt(ctx context.Context, attemptKey string, claimTimeout time.Duration) (bool, error) |
| 122 | } |
| 123 | |
| 124 | // WorkerHeartbeatRecord is the shared presence record for a worker. |
| 125 | type WorkerHeartbeatRecord struct { |
no outgoing calls
no test coverage detected