Documentation ¶
Index ¶
- type ClientConfig
- type TaskClient
- func (t *TaskClient) Close()
- func (t *TaskClient) Dispatch(typeName string, v interface{}, opts ...asynq.Option) (*asynq.TaskInfo, error)
- func (t *TaskClient) SetProcessAt(timeAt time.Time) asynq.Option
- func (t *TaskClient) SetProcessIn(timeIn time.Duration) asynq.Option
- func (t *TaskClient) SetTimeOut(timeout time.Duration) asynq.Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientConfig ¶
type ClientConfig struct { Addr string `json:"addr"` //redis服务器地址,默认localhost:6379 Password string `json:"password,omitempty,optional"` //密码 DB int `json:"db,omitempty,optional"` //db Retry int `json:"retry,omitempty,optional"` //最大重试次数 Queue string `json:"queue,omitempty,optional"` //加入的队列 Group string `json:"group,omitempty,optional"` //加入的任务组 }
type TaskClient ¶
type TaskClient struct {
// contains filtered or unexported fields
}
func NewTaskClient ¶
func NewTaskClient(conf ClientConfig) *TaskClient
func (*TaskClient) Close ¶
func (t *TaskClient) Close()
func (*TaskClient) SetProcessAt ¶
func (t *TaskClient) SetProcessAt(timeAt time.Time) asynq.Option
func (*TaskClient) SetProcessIn ¶
func (t *TaskClient) SetProcessIn(timeIn time.Duration) asynq.Option
func (*TaskClient) SetTimeOut ¶
func (t *TaskClient) SetTimeOut(timeout time.Duration) asynq.Option
Click to show internal directories.
Click to hide internal directories.