Documentation ¶
Index ¶
- Constants
- type Log
- type Task
- func (t *Task) CancelExecTask(ctx kratosx.Context, uuid string) error
- func (t *Task) CreateTask(ctx kratosx.Context, task *entity.Task) (uint32, error)
- func (t *Task) CreateTaskGroup(ctx kratosx.Context, tg *entity.TaskGroup) (uint32, error)
- func (t *Task) DeleteTask(ctx kratosx.Context, id uint32) error
- func (t *Task) DeleteTaskGroup(ctx kratosx.Context, id uint32) error
- func (t *Task) ExecTask(ctx kratosx.Context, id uint32) error
- func (t *Task) GetTask(ctx kratosx.Context, id uint32) (*entity.Task, error)
- func (t *Task) GetTaskGroup(ctx kratosx.Context, id uint32) (*entity.TaskGroup, error)
- func (t *Task) ListTask(ctx kratosx.Context, req *types.ListTaskRequest) ([]*entity.Task, uint32, error)
- func (t *Task) ListTaskGroup(ctx kratosx.Context, req *types.ListTaskGroupRequest) ([]*entity.TaskGroup, uint32, error)
- func (t *Task) Scheduler(ctx kratosx.Context, id uint32, spec string, force bool) error
- func (t *Task) UpdateTask(ctx kratosx.Context, task *entity.Task) error
- func (t *Task) UpdateTaskGroup(ctx kratosx.Context, tg *entity.TaskGroup) error
- func (t *Task) UpdateTaskStatus(ctx kratosx.Context, id uint32, status bool) error
- type Worker
- func (w *Worker) CreateWorker(ctx kratosx.Context, worker *entity.Worker) (uint32, error)
- func (w *Worker) CreateWorkerGroup(ctx kratosx.Context, wg *entity.WorkerGroup) (uint32, error)
- func (w *Worker) DeleteWorker(ctx kratosx.Context, id uint32) error
- func (w *Worker) DeleteWorkerGroup(ctx kratosx.Context, id uint32) error
- func (w *Worker) GetWorker(ctx kratosx.Context, req *types.GetWorkerRequest) (*entity.Worker, error)
- func (w *Worker) GetWorkerGroup(ctx kratosx.Context, id uint32) (*entity.WorkerGroup, error)
- func (w *Worker) ListWorker(ctx kratosx.Context, req *types.ListWorkerRequest) ([]*entity.Worker, uint32, error)
- func (w *Worker) ListWorkerGroup(ctx kratosx.Context, req *types.ListWorkerGroupRequest) ([]*entity.WorkerGroup, uint32, error)
- func (w *Worker) UpdateWorker(ctx kratosx.Context, worker *entity.Worker) error
- func (w *Worker) UpdateWorkerGroup(ctx kratosx.Context, wg *entity.WorkerGroup) error
- func (w *Worker) UpdateWorkerStatus(ctx kratosx.Context, id uint32, status bool) error
Constants ¶
View Source
const ( ExecRunning = "running" ExecFail = "fail" ExecCancel = "cancel" ExecSuccess = "success" )
View Source
const (
ExecTypeGroup = "group"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func NewTask ¶
func NewTask( conf *conf.Config, repo repository.Task, worker repository.Worker, log repository.Log, taskClient repository.TaskClient, ) *Task
func (*Task) CancelExecTask ¶
CancelExecTask 取消执行任务
func (*Task) CreateTask ¶
CreateTask 创建任务信息
func (*Task) CreateTaskGroup ¶
CreateTaskGroup 创建任务分组
func (*Task) DeleteTask ¶
DeleteTask 删除任务信息
func (*Task) DeleteTaskGroup ¶
DeleteTaskGroup 删除任务分组
func (*Task) GetTaskGroup ¶
GetTaskGroup 获取指定的任务分组
func (*Task) ListTask ¶
func (t *Task) ListTask(ctx kratosx.Context, req *types.ListTaskRequest) ([]*entity.Task, uint32, error)
ListTask 获取任务信息列表
func (*Task) ListTaskGroup ¶
func (t *Task) ListTaskGroup(ctx kratosx.Context, req *types.ListTaskGroupRequest) ([]*entity.TaskGroup, uint32, error)
ListTaskGroup 获取任务分组列表
func (*Task) UpdateTask ¶
UpdateTask 更新任务信息
func (*Task) UpdateTaskGroup ¶
UpdateTaskGroup 更新任务分组
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker( conf *conf.Config, repo repository.Worker, taskClient repository.TaskClient, ) *Worker
func (*Worker) CreateWorker ¶
CreateWorker 创建节点信息
func (*Worker) CreateWorkerGroup ¶
CreateWorkerGroup 创建节点分组
func (*Worker) DeleteWorker ¶
DeleteWorker 删除节点信息
func (*Worker) DeleteWorkerGroup ¶
DeleteWorkerGroup 删除节点分组
func (*Worker) GetWorker ¶
func (w *Worker) GetWorker(ctx kratosx.Context, req *types.GetWorkerRequest) (*entity.Worker, error)
GetWorker 获取指定的节点信息
func (*Worker) GetWorkerGroup ¶
GetWorkerGroup 获取指定的节点分组
func (*Worker) ListWorker ¶
func (w *Worker) ListWorker(ctx kratosx.Context, req *types.ListWorkerRequest) ([]*entity.Worker, uint32, error)
ListWorker 获取节点信息列表
func (*Worker) ListWorkerGroup ¶
func (w *Worker) ListWorkerGroup(ctx kratosx.Context, req *types.ListWorkerGroupRequest) ([]*entity.WorkerGroup, uint32, error)
ListWorkerGroup 获取节点分组列表
func (*Worker) UpdateWorker ¶
UpdateWorker 更新节点信息
func (*Worker) UpdateWorkerGroup ¶
UpdateWorkerGroup 更新节点分组
Click to show internal directories.
Click to hide internal directories.