task

package
v0.0.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TypeExampleCreate 定义任务名称,异步创建一个样例数据
	TypeExampleCreate = "ex:example:create:create-an-example"
)

A list of task types. 任务名称的列表

Variables

This section is empty.

Functions

func NewExampleCreateTask

func NewExampleCreateTask(ctx frame.IContext, age int8) (*asynq.Task, error)

NewExampleCreateTask 生成一个 ExampleCreate 任务,从调用处获取相关参数,并返回任务

Types

type PayloadExampleCreate

type PayloadExampleCreate struct {
	frame.PayloadBase // 继承基础负载结构体,自动具备获取json编解码器的方法
	/**
	负载的数据
	*/
	Age int8
}

PayloadExampleCreate 样例创建负载的数据

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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