Documentation ¶
Index ¶
- func GetMaxRetry(ctx context.Context) (n int, ok bool)
- func GetQueueName(ctx context.Context) (qname string, ok bool)
- func GetRetryCount(ctx context.Context) (n int, ok bool)
- func GetTaskID(ctx context.Context) (id string, ok bool)
- func New(base context.Context, msg *base.TaskMessage, deadline time.Time) (context.Context, context.CancelFunc)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMaxRetry ¶
GetMaxRetry extracts maximum retry from a context, if any.
Return value n indicates the maximum number of times the associated task can be retried if ProcessTask returns a non-nil error.
func GetQueueName ¶
GetQueueName extracts queue name from a context, if any.
Return value qname indicates which queue the task was pulled from.
func GetRetryCount ¶
GetRetryCount extracts retry count from a context, if any.
Return value n indicates the number of times associated task has been retried so far.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.