worker

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EngineClient

type EngineClient struct {
	Running bool
	Router  map[string]Task

	Opt    *asynq.RedisClientOpt
	Server *asynq.Server
}
var Engine *EngineClient

func InitEngine

func InitEngine(rds *asynq.RedisClientOpt, config asynq.Config) *EngineClient

func (*EngineClient) Add

func (e *EngineClient) Add(task *asynq.Task) error

func (*EngineClient) Register

func (e *EngineClient) Register(t Task)

func (*EngineClient) Run

func (e *EngineClient) Run()

type Task

type Task interface {
	GetName() string
	ProcessTask(ctx context.Context, task *asynq.Task) error
}

Jump to

Keyboard shortcuts

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