Documentation
¶
Index ¶
- type Base
- func (q *Base) Add(queueName string, add QueueAdd) (string, error)
- func (q *Base) AddDelay(queueName string, add QueueAddDelay) (string, error)
- func (q *Base) Close() error
- func (q *Base) Del(queueName string, id string) error
- func (q *Base) List(queueName string, page int, limit int) ([]QueueItem, int64, error)
- func (q *Base) Names() []string
- func (q *Base) Register(queueName string, name string, ...) error
- func (q *Base) Start() error
- func (q *Base) Worker(queueName string)
- type BaseLogger
- type BaseQueue
- type Queue
- type QueueAdd
- type QueueAddDelay
- type QueueItem
- type Redis
- func (q *Redis) Add(queueName string, add QueueAdd) (string, error)
- func (q *Redis) AddDelay(queueName string, add QueueAddDelay) (string, error)
- func (q *Redis) Close() error
- func (q *Redis) Del(queueName string, id string) error
- func (q *Redis) List(queueName string, page int, limit int) ([]QueueItem, int64, error)
- func (q *Redis) Names() []string
- func (q *Redis) Register(queueName string, name string, ...) error
- func (q *Redis) Start() error
- func (q *Redis) Worker(queueName string)
- type TaskLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct {
Context context.Context
Cancel context.CancelFunc
// contains filtered or unexported fields
}
func (*Base) AddDelay ¶
func (q *Base) AddDelay(queueName string, add QueueAddDelay) (string, error)
type BaseLogger ¶
type BaseLogger struct{}
func (*BaseLogger) Info ¶
func (l *BaseLogger) Info(msg string, args ...any)
type Queue ¶
type Queue interface {
Worker(queueName string)
Start() error
Register(queueName, name string, callback func(ctx context.Context, params []byte) error) error
Add(queueName string, add QueueAdd) (id string, err error)
AddDelay(queueName string, add QueueAddDelay) (id string, err error)
Del(queueName string, id string) error
List(queueName string, page int, limit int) (data []QueueItem, count int64, err error)
Names() []string
Close() error
}
type QueueAddDelay ¶
type Redis ¶
type Redis struct {
Context context.Context
Cancel context.CancelFunc
Server *asynq.Server
ServeMuxs map[string]*asynq.ServeMux
Client *asynq.Client
Inspector *asynq.Inspector
Mux *asynq.ServeMux
}
func (*Redis) AddDelay ¶
func (q *Redis) AddDelay(queueName string, add QueueAddDelay) (string, error)
type TaskLogger ¶
func (*TaskLogger) Debug ¶
func (t *TaskLogger) Debug(args ...interface{})
func (*TaskLogger) Error ¶
func (t *TaskLogger) Error(args ...interface{})
func (*TaskLogger) Fatal ¶
func (t *TaskLogger) Fatal(args ...interface{})
func (*TaskLogger) Info ¶
func (t *TaskLogger) Info(args ...interface{})
func (*TaskLogger) Warn ¶
func (t *TaskLogger) Warn(args ...interface{})
Click to show internal directories.
Click to hide internal directories.