WithContext sets the context for the TaskQueue
(ctx context.Context)
| 141 | |
| 142 | // WithContext sets the context for the TaskQueue |
| 143 | func WithContext(ctx context.Context) TaskQueueOption { |
| 144 | return func(q *TaskQueue) { |
| 145 | q.ctx, q.cancel = context.WithCancel(ctx) |
| 146 | } |
| 147 | } |
| 148 | |
| 149 | // WithHandler sets the task handler for the TaskQueue |
| 150 | func WithHandler(fn func(ctx context.Context, t task.Task) TaskResult) TaskQueueOption { |
no outgoing calls