mq

package
v0.3.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 28, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

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) Dispatch

func (t *TaskClient) Dispatch(typeName string, v interface{}, opts ...asynq.Option) (*asynq.TaskInfo, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL