taskrepo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	// 事务创建任务记录和任务调度信息
	CreateTask(ctx context.Context, task *model.Task) error
	// 事务更新任务和任务调度信息
	UpdateTask(ctx context.Context, task *model.Task) error
	// 获取任务
	GetTask(ctx context.Context, taskKey string) (*model.Task, error)
	// 批量获取任务
	BatchGetTask(ctx context.Context, taskKeys []string) ([]*model.Task, error)
	// 查询任务列表
	ListTask(ctx context.Context, filter *model.TaskFilter) ([]*model.Task, error)

	// returns all runnable tasks of the current worker.
	// if workerID is empty, returns all runnable tasks.
	ListRunnableTasks(ctx context.Context, workerID string) (keys []string, err error)
	// watch all runnable tasks change.
	WatchRunnableTasks(ctx context.Context, workerID string) (keys <-chan []string, err error)
}

Jump to

Keyboard shortcuts

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