Documentation ¶
Index ¶
- type Factory
- type GetTaskGroupRequest
- type GetTaskRequest
- type ListTaskGroupRequest
- type ListTaskRequest
- type Repo
- type Task
- type TaskGroup
- type UseCase
- func (u *UseCase) CancelExecTask(ctx kratosx.Context, uuid string) error
- func (u *UseCase) CreateTask(ctx kratosx.Context, req *Task) (uint32, error)
- func (u *UseCase) CreateTaskGroup(ctx kratosx.Context, req *TaskGroup) (uint32, error)
- func (u *UseCase) DeleteTask(ctx kratosx.Context, id uint32) error
- func (u *UseCase) DeleteTaskGroup(ctx kratosx.Context, id uint32) error
- func (u *UseCase) ExecTask(ctx kratosx.Context, id uint32) error
- func (u *UseCase) GetTask(ctx kratosx.Context, req *GetTaskRequest) (*Task, error)
- func (u *UseCase) GetTaskGroup(ctx kratosx.Context, req *GetTaskGroupRequest) (*TaskGroup, error)
- func (u *UseCase) ListTask(ctx kratosx.Context, req *ListTaskRequest) ([]*Task, uint32, error)
- func (u *UseCase) ListTaskGroup(ctx kratosx.Context, req *ListTaskGroupRequest) ([]*TaskGroup, uint32, error)
- func (u *UseCase) UpdateTask(ctx kratosx.Context, req *Task) error
- func (u *UseCase) UpdateTaskGroup(ctx kratosx.Context, req *TaskGroup) error
- func (u *UseCase) UpdateTaskStatus(ctx kratosx.Context, id uint32, status bool) error
- type Worker
- type WorkerGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetTaskGroupRequest ¶
type GetTaskGroupRequest struct {
Id *uint32 `json:"id"`
}
type GetTaskRequest ¶
type GetTaskRequest struct {
Id *uint32 `json:"id"`
}
type ListTaskGroupRequest ¶
type ListTaskRequest ¶
type Repo ¶
type Repo interface { // GetTaskGroup 获取指定的任务分组 GetTaskGroup(ctx kratosx.Context, id uint32) (*TaskGroup, error) // ListTaskGroup 获取任务分组列表 ListTaskGroup(ctx kratosx.Context, req *ListTaskGroupRequest) ([]*TaskGroup, uint32, error) // CreateTaskGroup 创建任务分组 CreateTaskGroup(ctx kratosx.Context, req *TaskGroup) (uint32, error) // UpdateTaskGroup 更新任务分组 UpdateTaskGroup(ctx kratosx.Context, req *TaskGroup) error // DeleteTaskGroup 删除任务分组 DeleteTaskGroup(ctx kratosx.Context, id uint32) error // GetTask 获取指定的任务信息 GetTask(ctx kratosx.Context, id uint32) (*Task, error) // ListTask 获取任务信息列表 ListTask(ctx kratosx.Context, req *ListTaskRequest) ([]*Task, uint32, error) // CreateTask 创建任务信息 CreateTask(ctx kratosx.Context, req *Task) (uint32, error) // UpdateTask 更新任务信息 UpdateTask(ctx kratosx.Context, req *Task) error // UpdateTaskStatus 更新任务信息状态 UpdateTaskStatus(ctx kratosx.Context, id uint32, status bool) error // DeleteTask 删除任务信息 DeleteTask(ctx kratosx.Context, id uint32) error // GetSpecs 获取所有的表达式 GetSpecs(ctx kratosx.Context) map[uint32]string }
type Task ¶
type Task struct { Id uint32 `json:"id"` GroupId uint32 `json:"groupId"` Name string `json:"name"` Tag string `json:"tag"` Spec string `json:"spec"` Status *bool `json:"status"` WorkerType string `json:"workerType"` WorkerGroupId *uint32 `json:"workerGroupId"` WorkerId *uint32 `json:"workerId"` ExecType string `json:"execType"` ExecValue string `json:"execValue"` ExpectCode uint32 `json:"expectCode"` RetryCount uint32 `json:"retryCount"` RetryWaitTime uint32 `json:"retryWaitTime"` MaxExecTime uint32 `json:"maxExecTime"` Version string `json:"version"` Description *string `json:"description"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` Group *TaskGroup `json:"group"` Worker *Worker `json:"worker"` WorkerGroup *WorkerGroup `json:"workerGroup"` }
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
func (*UseCase) CancelExecTask ¶
CancelExecTask 取消执行任务
func (*UseCase) CreateTask ¶
CreateTask 创建任务信息
func (*UseCase) CreateTaskGroup ¶
CreateTaskGroup 创建任务分组
func (*UseCase) DeleteTask ¶
DeleteTask 删除任务信息
func (*UseCase) DeleteTaskGroup ¶
DeleteTaskGroup 删除任务分组
func (*UseCase) GetTaskGroup ¶
GetTaskGroup 获取指定的任务分组
func (*UseCase) ListTaskGroup ¶
func (u *UseCase) ListTaskGroup(ctx kratosx.Context, req *ListTaskGroupRequest) ([]*TaskGroup, uint32, error)
ListTaskGroup 获取任务分组列表
func (*UseCase) UpdateTask ¶
UpdateTask 更新任务信息
func (*UseCase) UpdateTaskGroup ¶
UpdateTaskGroup 更新任务分组
type WorkerGroup ¶
type WorkerGroup struct {
Name string `json:"name"`
}
Click to show internal directories.
Click to hide internal directories.