impl

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TaskServiceImpl

type TaskServiceImpl struct {
	ioc.ObjectImpl

	// 随机节点名, 用于单节点调试
	RandomNodeName bool `toml:"random_node_name" json:"random_node_name" yaml:"random_node_name"  env:"RANDOM_NODE_NAME"`
	// 运行队列名称
	RunTopic string `toml:"run_topic" json:"run_topic" yaml:"run_topic"  env:"RUN_TOPIC"`
	// 更新队列名称
	UpdateTopic string `toml:"update_topic" json:"update_topic" yaml:"update_topic"  env:"UPDATE_TOPIC"`
	// 取消队列名称
	CancelTopic string `toml:"cancel_topic" json:"cancel_topic" yaml:"cancel_topic"  env:"CANCEL_TOPIC"`
	// 任务事件状态变更队列, 通知其他服务任务状态有更新
	ChangedTopic string `toml:"changed_topic" json:"changed_topic" yaml:"changed_topic"  env:"CHANGED_TOPIC"`
	// contains filtered or unexported fields
}

func (*TaskServiceImpl) AddAsyncTask

func (s *TaskServiceImpl) AddAsyncTask(t *task.Task)

func (*TaskServiceImpl) Cancel added in v0.0.21

func (s *TaskServiceImpl) Cancel(ctx context.Context, in *task.CancelRequest) (*task.Task, error)

任务取消

func (*TaskServiceImpl) CreateTask added in v0.0.21

func (s *TaskServiceImpl) CreateTask(ctx context.Context, in *task.TaskSpec) (*task.Task, error)

创建任务

func (*TaskServiceImpl) DescribeTask

func (i *TaskServiceImpl) DescribeTask(ctx context.Context, in *task.DescribeTaskRequest) (*task.Task, error)

DescribeTask implements task.Service.

func (*TaskServiceImpl) GetAsyncTask added in v0.0.21

func (s *TaskServiceImpl) GetAsyncTask(id string) *task.Task

func (*TaskServiceImpl) HandleCancelEvents added in v0.0.21

func (c *TaskServiceImpl) HandleCancelEvents(ctx context.Context)

处理任务取消队列

func (*TaskServiceImpl) HandleRunEvents added in v0.0.21

func (c *TaskServiceImpl) HandleRunEvents(ctx context.Context)

处理任务运行队列

func (*TaskServiceImpl) HandleUpdateEvents added in v0.0.23

func (c *TaskServiceImpl) HandleUpdateEvents(ctx context.Context)

处理任务更新事件

func (*TaskServiceImpl) Init

func (i *TaskServiceImpl) Init() error

func (*TaskServiceImpl) Name

func (i *TaskServiceImpl) Name() string

func (*TaskServiceImpl) Priority added in v0.0.21

func (i *TaskServiceImpl) Priority() int

func (*TaskServiceImpl) QueryTask

func (i *TaskServiceImpl) QueryTask(ctx context.Context, in *task.QueryTaskRequest) (*types.Set[*task.Task], error)

QueryTask implements task.Service.

func (*TaskServiceImpl) RemoveAsyncTask

func (s *TaskServiceImpl) RemoveAsyncTask(t *task.Task)

func (*TaskServiceImpl) Run

func (s *TaskServiceImpl) Run(ctx context.Context, in *task.TaskSpec) (*task.Task, error)

Run implements task.Service.

func (*TaskServiceImpl) UpdateTaskStatus added in v0.0.23

func (s *TaskServiceImpl) UpdateTaskStatus(ctx context.Context, in *task.UpdateTaskStatusRequest) (*task.Task, error)

触发任务同步

Jump to

Keyboard shortcuts

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