taskqueue

package
v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier added in v3.3.1

type Notifier interface {
	SendEvent(event biz.NotifyEvent, subject, body string)
}

Notifier 事件通知,由 biz.NotifyUsecase 实现

type Runner

type Runner struct {
	// contains filtered or unexported fields
}

func NewRunner

func NewRunner(db *gorm.DB, log *slog.Logger, notifier Notifier, t *gotext.Locale) *Runner

NewRunner 创建任务运行器

func (*Runner) Cancel added in v3.3.0

func (r *Runner) Cancel(id uint) bool

Cancel 取消正在运行的任务,返回是否命中

func (*Runner) Notify

func (r *Runner) Notify()

Notify 非阻塞通知运行器有新任务,供 Push 调用

func (*Runner) Run

func (r *Runner) Run(ctx context.Context)

Run 启动运行器

Jump to

Keyboard shortcuts

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