Documentation ¶
Index ¶
- type Factory
- type GetWorkerGroupRequest
- type GetWorkerRequest
- type ListWorkerGroupRequest
- type ListWorkerRequest
- type Repo
- type UseCase
- func (u *UseCase) CreateWorker(ctx kratosx.Context, req *Worker) (uint32, error)
- func (u *UseCase) CreateWorkerGroup(ctx kratosx.Context, req *WorkerGroup) (uint32, error)
- func (u *UseCase) DeleteWorker(ctx kratosx.Context, id uint32) error
- func (u *UseCase) DeleteWorkerGroup(ctx kratosx.Context, id uint32) error
- func (u *UseCase) GetWorker(ctx kratosx.Context, req *GetWorkerRequest) (*Worker, error)
- func (u *UseCase) GetWorkerGroup(ctx kratosx.Context, req *GetWorkerGroupRequest) (*WorkerGroup, error)
- func (u *UseCase) ListWorker(ctx kratosx.Context, req *ListWorkerRequest) ([]*Worker, uint32, error)
- func (u *UseCase) ListWorkerGroup(ctx kratosx.Context, req *ListWorkerGroupRequest) ([]*WorkerGroup, uint32, error)
- func (u *UseCase) UpdateWorker(ctx kratosx.Context, req *Worker) error
- func (u *UseCase) UpdateWorkerGroup(ctx kratosx.Context, req *WorkerGroup) error
- func (u *UseCase) UpdateWorkerStatus(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 GetWorkerGroupRequest ¶
type GetWorkerGroupRequest struct {
Id *uint32 `json:"id"`
}
type GetWorkerRequest ¶
type ListWorkerGroupRequest ¶
type ListWorkerRequest ¶
type Repo ¶
type Repo interface { // GetWorkerGroup 获取指定的节点分组 GetWorkerGroup(ctx kratosx.Context, id uint32) (*WorkerGroup, error) // ListWorkerGroup 获取节点分组列表 ListWorkerGroup(ctx kratosx.Context, req *ListWorkerGroupRequest) ([]*WorkerGroup, uint32, error) // CreateWorkerGroup 创建节点分组 CreateWorkerGroup(ctx kratosx.Context, req *WorkerGroup) (uint32, error) // UpdateWorkerGroup 更新节点分组 UpdateWorkerGroup(ctx kratosx.Context, req *WorkerGroup) error // DeleteWorkerGroup 删除节点分组 DeleteWorkerGroup(ctx kratosx.Context, id uint32) error // GetWorker 获取指定的节点信息 GetWorker(ctx kratosx.Context, id uint32) (*Worker, error) // ListWorker 获取节点信息列表 ListWorker(ctx kratosx.Context, req *ListWorkerRequest) ([]*Worker, uint32, error) // CreateWorker 创建节点信息 CreateWorker(ctx kratosx.Context, req *Worker) (uint32, error) // UpdateWorker 更新节点信息 UpdateWorker(ctx kratosx.Context, req *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) (*Worker, error) // GetWorkerByGroupId 获取随机节点 GetWorkerByGroupId(ctx kratosx.Context, id uint32) (*Worker, error) }
type UseCase ¶
type UseCase struct {
// contains filtered or unexported fields
}
func (*UseCase) CreateWorker ¶
CreateWorker 创建节点信息
func (*UseCase) CreateWorkerGroup ¶
CreateWorkerGroup 创建节点分组
func (*UseCase) DeleteWorker ¶
DeleteWorker 删除节点信息
func (*UseCase) DeleteWorkerGroup ¶
DeleteWorkerGroup 删除节点分组
func (*UseCase) GetWorkerGroup ¶
func (u *UseCase) GetWorkerGroup(ctx kratosx.Context, req *GetWorkerGroupRequest) (*WorkerGroup, error)
GetWorkerGroup 获取指定的节点分组
func (*UseCase) ListWorker ¶
func (u *UseCase) ListWorker(ctx kratosx.Context, req *ListWorkerRequest) ([]*Worker, uint32, error)
ListWorker 获取节点信息列表
func (*UseCase) ListWorkerGroup ¶
func (u *UseCase) ListWorkerGroup(ctx kratosx.Context, req *ListWorkerGroupRequest) ([]*WorkerGroup, uint32, error)
ListWorkerGroup 获取节点分组列表
func (*UseCase) UpdateWorker ¶
UpdateWorker 更新节点信息
func (*UseCase) UpdateWorkerGroup ¶
func (u *UseCase) UpdateWorkerGroup(ctx kratosx.Context, req *WorkerGroup) error
UpdateWorkerGroup 更新节点分组
Click to show internal directories.
Click to hide internal directories.