Documentation ¶
Index ¶
- type Log
- func (l *Log) AppendLogContent(ctx kratosx.Context, uuid string, content string) error
- func (l *Log) CreateLog(ctx kratosx.Context, log *entity.Log) (uint32, error)
- func (l *Log) DeleteLog(ctx kratosx.Context, id uint32) error
- func (l *Log) GetLog(ctx kratosx.Context, id uint32) (*entity.Log, error)
- func (l *Log) GetLogByUuid(ctx kratosx.Context, uuid string) (*entity.Log, error)
- func (l *Log) GetLogStatusByUuid(ctx kratosx.Context, uuid string) (string, error)
- func (l *Log) GetTargetIpByUuid(ctx kratosx.Context, uuid string) (string, error)
- func (l *Log) ListLog(ctx kratosx.Context, req *types.ListLogRequest) ([]*entity.Log, uint32, error)
- func (l *Log) UpdateLog(ctx kratosx.Context, log *entity.Log) error
- func (l *Log) UpdateLogStatus(ctx kratosx.Context, uuid string, status string) error
- type Task
- func (t *Task) AddCron(id uint32, spec string) error
- func (t *Task) AllTaskSpecs(ctx kratosx.Context) map[uint32]string
- func (t *Task) CloseCron()
- 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) 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) RemoveCron(id uint32) error
- func (t *Task) StartCron(scheduler func(ctx kratosx.Context, id uint32, spec string, force bool) error)
- func (t *Task) UpdateCron(id uint32, spec string) 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
- func (t *Task) ValidateSpec(s string) error
- type Worker
- func (w *Worker) CheckIP(ctx kratosx.Context, req *types.CheckWorkerRequest) error
- 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, id uint32) (*entity.Worker, error)
- func (w *Worker) GetWorkerByGroupId(ctx kratosx.Context, id uint32) (*entity.Worker, error)
- func (w *Worker) GetWorkerByIp(ctx kratosx.Context, ip string) (*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) RegistryCheckIP(ctx kratosx.Context, ...)
- 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 ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Log ¶
type Log struct { }
func (*Log) AppendLogContent ¶
AppendLogContent 追加指定的uuid的日志内容
func (*Log) GetLogByUuid ¶
GetLogByUuid 获取指定的数据
func (*Log) GetLogStatusByUuid ¶
GetLogStatusByUuid 获取指定uuid的状态
func (*Log) GetTargetIpByUuid ¶
GetTargetIpByUuid 获取指定uuid
func (*Log) ListLog ¶
func (l *Log) ListLog(ctx kratosx.Context, req *types.ListLogRequest) ([]*entity.Log, uint32, error)
ListLog 获取列表
type Task ¶
type Task struct {
// contains filtered or unexported fields
}
func (*Task) AllTaskSpecs ¶
AllTaskSpecs 获取当前启用的任务的所有定时时间表达式
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) StartCron ¶
func (t *Task) StartCron(scheduler func(ctx kratosx.Context, id uint32, spec string, force bool) error)
StartCron 启动定时调度程序
func (*Task) UpdateTask ¶
UpdateTask 更新数据
func (*Task) UpdateTaskGroup ¶
UpdateTaskGroup 更新数据
func (*Task) UpdateTaskStatus ¶
UpdateTaskStatus 更新数据状态
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func (*Worker) CreateWorker ¶
CreateWorker 创建数据
func (*Worker) CreateWorkerGroup ¶
CreateWorkerGroup 创建数据
func (*Worker) DeleteWorker ¶
DeleteWorker 删除数据
func (*Worker) DeleteWorkerGroup ¶
DeleteWorkerGroup 删除数据
func (*Worker) GetWorkerByGroupId ¶
func (*Worker) GetWorkerByIp ¶
GetWorkerByIp 获取指定数据
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) RegistryCheckIP ¶
func (w *Worker) RegistryCheckIP(ctx kratosx.Context, check func(kratosx.Context, *types.CheckWorkerRequest) error)
RegistryCheckIP 注册监听接收发送的检测信号
func (*Worker) UpdateWorker ¶
UpdateWorker 更新数据
func (*Worker) UpdateWorkerGroup ¶
UpdateWorkerGroup 更新数据
Click to show internal directories.
Click to hide internal directories.