Documentation ¶
Index ¶
- type Task
- func (t *Task) Cancel() error
- func (t *Task) Complete(result string) error
- func (t *Task) CreatedAt() int64
- func (t *Task) Fail() error
- func (t *Task) GetTimeout() int32
- func (t *Task) MaxRetries() int32
- func (t *Task) NotBefore() int64
- func (t *Task) ObjectID() string
- func (t *Task) Owner() string
- func (t *Task) Payload() string
- func (t *Task) Queue() string
- func (t *Task) Result() (string, error)
- func (t *Task) Retries() int32
- func (t *Task) Select() error
- func (t *Task) State() string
- func (t *Task) Timeout() error
- func (t *Task) UpdatedAt() int64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Task ¶
type Task struct { TaskID string // contains filtered or unexported fields }
Task is a task to be executed
func NewFutureTask ¶ added in v1.2.0
func NewFutureTask(owner string, taskQueue string, payload string, timeout int32, maxRetries int32, notBefore int64) (*Task, error)
NewTask creates a new task
func (*Task) GetTimeout ¶
func (*Task) MaxRetries ¶
func (*Task) Result ¶
Result returns the result of the task if it is completed and an error otherwise
Click to show internal directories.
Click to hide internal directories.