Documentation
¶
Index ¶
Constants ¶
View Source
const ( QueueImmediate = "queue:immediate" QueueDelayed = "queue:delayed" QueueRetry = "queue:retry" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AsyncTask ¶
func NewAsyncTask ¶
func NewAsyncTask(opt AsyncTaskOption) (*AsyncTask, error)
type AsyncTaskOption ¶
type Option ¶
type Option interface {
Type() OptionType
Value() interface{}
}
func ExecuteAtOpt ¶
func MaxRetriesOpt ¶
type OptionType ¶
type OptionType int
const ( MaxRetries OptionType = iota + 1 ExecuteAt TaskID Queue )
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
func (*Scheduler) RegisterHandler ¶
type TaskInfo ¶
type TaskInfo struct {
ID string `json:"id"`
TypeName string `json:"type_name"`
QueueName string `json:"queue_name"`
Payload map[string]interface{} `json:"payload"`
MaxRetries int `json:"max_retries"`
RetryCount int `json:"retry_count"`
ExecuteAt time.Time `json:"execute_at"`
FailedReason string `json:"failed_reason"`
}
Click to show internal directories.
Click to hide internal directories.