Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log interface { // GetLogStatusByUuid 获取指定的日志的状态 GetLogStatusByUuid(ctx kratosx.Context, uid string) (string, error) // GetLog 获取指定的日志信息 GetLog(ctx kratosx.Context, id uint32) (*entity.Log, error) // GetLogByUuid 获取指定的日志信息 GetLogByUuid(ctx kratosx.Context, uuid string) (*entity.Log, error) // ListLog 获取日志信息列表 ListLog(ctx kratosx.Context, req *types.ListLogRequest) ([]*entity.Log, uint32, error) // CreateLog 创建日志信息 CreateLog(ctx kratosx.Context, req *entity.Log) (uint32, error) // DeleteLog 删除日志信息 DeleteLog(ctx kratosx.Context, id uint32) error // AppendLogContent 追加日志内容 AppendLogContent(ctx kratosx.Context, uuid string, c string) error // UpdateLogStatus 更新日志状态 UpdateLogStatus(ctx kratosx.Context, uuid string, status string) error // GetTargetIpByUuid 获取指定任务的执行节点ip GetTargetIpByUuid(ctx kratosx.Context, uuid string) (string, error) }
type Task ¶
type Task interface { // GetTaskGroup 获取指定的任务分组 GetTaskGroup(ctx kratosx.Context, id uint32) (*entity.TaskGroup, error) // ListTaskGroup 获取任务分组列表 ListTaskGroup(ctx kratosx.Context, req *types.ListTaskGroupRequest) ([]*entity.TaskGroup, uint32, error) // CreateTaskGroup 创建任务分组 CreateTaskGroup(ctx kratosx.Context, req *entity.TaskGroup) (uint32, error) // UpdateTaskGroup 更新任务分组 UpdateTaskGroup(ctx kratosx.Context, req *entity.TaskGroup) error // DeleteTaskGroup 删除任务分组 DeleteTaskGroup(ctx kratosx.Context, id uint32) error // GetTask 获取指定的任务信息 GetTask(ctx kratosx.Context, id uint32) (*entity.Task, error) // ListTask 获取任务信息列表 ListTask(ctx kratosx.Context, req *types.ListTaskRequest) ([]*entity.Task, uint32, error) // CreateTask 创建任务信息 CreateTask(ctx kratosx.Context, req *entity.Task) (uint32, error) // UpdateTask 更新任务信息 UpdateTask(ctx kratosx.Context, req *entity.Task) error // UpdateTaskStatus 更新任务状态信息 UpdateTaskStatus(ctx kratosx.Context, id uint32, status bool) error // DeleteTask 删除任务信息 DeleteTask(ctx kratosx.Context, id uint32) error // AllTaskSpecs 获取所有的表达式 AllTaskSpecs(ctx kratosx.Context) map[uint32]string // StartCron 启动定时任务 StartCron(scheduler func(ctx kratosx.Context, id uint32, spec string, force bool) error) // ValidateSpec 验证定时任务表达式 ValidateSpec(s string) error // AddCron 添加定时任务 AddCron(id uint32, spec string) error // RemoveCron 删除定时任务 RemoveCron(id uint32) error // UpdateCron 更新定时任务 UpdateCron(id uint32, spec string) error // CloseCron 优雅关闭停止定时任务 CloseCron() }
type TaskClient ¶
type TaskClient interface { // ExecTask 执行任务 ExecTask(ctx kratosx.Context, req *types.ExecTaskRequest, recv func(msg *types.ExecTaskLog)) error // CancelExec 取消执行任务 CancelExec(ctx kratosx.Context, req *types.CancelExecRequest) error // CheckHealthy 检查节点健康状况 error CheckHealthy(ctx kratosx.Context, req *types.CheckWorkerRequest) error }
type Worker ¶
type Worker interface { // GetWorkerGroup 获取指定的节点分组 GetWorkerGroup(ctx kratosx.Context, id uint32) (*entity.WorkerGroup, error) // ListWorkerGroup 获取节点分组列表 ListWorkerGroup(ctx kratosx.Context, req *types.ListWorkerGroupRequest) ([]*entity.WorkerGroup, uint32, error) // CreateWorkerGroup 创建节点分组 CreateWorkerGroup(ctx kratosx.Context, req *entity.WorkerGroup) (uint32, error) // UpdateWorkerGroup 更新节点分组 UpdateWorkerGroup(ctx kratosx.Context, req *entity.WorkerGroup) error // DeleteWorkerGroup 删除节点分组 DeleteWorkerGroup(ctx kratosx.Context, id uint32) error // GetWorker 获取指定的节点信息 GetWorker(ctx kratosx.Context, id uint32) (*entity.Worker, error) // ListWorker 获取节点信息列表 ListWorker(ctx kratosx.Context, req *types.ListWorkerRequest) ([]*entity.Worker, uint32, error) // CreateWorker 创建节点信息 CreateWorker(ctx kratosx.Context, req *entity.Worker) (uint32, error) // UpdateWorker 更新节点信息 UpdateWorker(ctx kratosx.Context, req *entity.Worker) error // UpdateWorkerStatus 更新节点信息状态 UpdateWorkerStatus(ctx kratosx.Context, id uint32, status bool) error // DeleteWorker 删除节点信息 DeleteWorker(ctx kratosx.Context, id uint32) error // GetWorkerByIp 获取指定的节点信息 GetWorkerByIp(ctx kratosx.Context, ip string) (*entity.Worker, error) // GetWorkerByGroupId 获取随机节点 GetWorkerByGroupId(ctx kratosx.Context, id uint32) (*entity.Worker, error) // CheckIP 检查节点是否可用 CheckIP(ctx kratosx.Context, req *types.CheckWorkerRequest) error // RegistryCheckIP 注册检查节点函数 RegistryCheckIP(ctx kratosx.Context, check func(ctx kratosx.Context, req *types.CheckWorkerRequest) error) }
Click to show internal directories.
Click to hide internal directories.