k8spod

package
v0.0.0-...-663e6fc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 22, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataCell

type DataCell interface {
	GetCreation() time.Time
	GetName() string
}

DataCell 接口,用于各种资源List的类型转换,转换后可以使用dataselector的排序,过滤,分页方法

type DataSelectQuery

type DataSelectQuery struct {
	Filter   *FilterQuery
	Paginate *PaginateQuery
}

DataSelectQuery 定义过滤和分页的结构体,过滤:Name 分页:Limit和Page

type DeletePodLogic

type DeletePodLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewDeletePodLogic

func NewDeletePodLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DeletePodLogic

func (*DeletePodLogic) DeletePod

func (l *DeletePodLogic) DeletePod(in *core.DeletePodReq) (*core.DeletePodResp, error)

type FilterQuery

type FilterQuery struct {
	Name string
}

FilterQuery 用于查询 过滤:Name

type GetPodContainerLogic

type GetPodContainerLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetPodContainerLogic

func NewGetPodContainerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPodContainerLogic

func (*GetPodContainerLogic) GetPodContainer

type GetPodDetailLogic

type GetPodDetailLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetPodDetailLogic

func NewGetPodDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPodDetailLogic

func (*GetPodDetailLogic) GetPodDetail

type GetPodLogLogic

type GetPodLogLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetPodLogLogic

func NewGetPodLogLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPodLogLogic

func (*GetPodLogLogic) GetPodLog

func (l *GetPodLogLogic) GetPodLog(in *core.GetPodLogReq) (*core.GetPodLogResp, error)

type GetPodNumPerNpLogic

type GetPodNumPerNpLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetPodNumPerNpLogic

func NewGetPodNumPerNpLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPodNumPerNpLogic

func (*GetPodNumPerNpLogic) GetPodNumPerNp

type GetPodsLogic

type GetPodsLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewGetPodsLogic

func NewGetPodsLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetPodsLogic

func (*GetPodsLogic) GetPods

func (l *GetPodsLogic) GetPods(in *core.GetPodsReq) (*core.GetPodsResp, error)

K8sPod management

type PaginateQuery

type PaginateQuery struct {
	Page  int
	Limit int
}

PaginateQuery 分页:Limit和Page Limit是单页的数据条数,Page是第几页

type Pod

type Pod struct{}

func (*Pod) DeletePod

func (p *Pod) DeletePod(l *DeletePodLogic, in *core.DeletePodReq) (deletePodResp *core.DeletePodResp, err error)

删除Pod

func (*Pod) GetPodContainer

func (p *Pod) GetPodContainer(l *GetPodContainerLogic, in *core.GetPodContainerReq) (getPodContainerResp *core.GetPodContainerResp, err error)

获取Pod中的容器名

func (*Pod) GetPodDetail

func (p *Pod) GetPodDetail(l *GetPodDetailLogic, in *core.GetPodDetailReq) (getPodDetailResp *core.GetPodDetailResp, err error)

获取pod详情

func (*Pod) GetPodLog

func (p *Pod) GetPodLog(l *GetPodLogLogic, in *core.GetPodLogReq) (getPodLogResp *core.GetPodLogResp, err error)

获取Pod内容器日志

func (*Pod) GetPodNumPerNp

func (p *Pod) GetPodNumPerNp(l *GetPodNumPerNpLogic, in *core.GetPodNumPerNpReq) (getPodNumPerNpResp *core.GetPodNumPerNpResp, err error)

获取每个namespace中pod的数量

func (*Pod) GetPods

func (p *Pod) GetPods(l *GetPodsLogic, in *core.GetPodsReq) (getPodsResp *core.GetPodsResp, err error)

获取pod列表,支持过滤,排序,分页

func (*Pod) UpdatePod

func (p *Pod) UpdatePod(l *UpdatePodLogic, in *core.UpdatePodReq) (updatePodResp *core.UpdatePodResp, err error)

更新Pod

type UpdatePodLogic

type UpdatePodLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewUpdatePodLogic

func NewUpdatePodLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UpdatePodLogic

func (*UpdatePodLogic) UpdatePod

func (l *UpdatePodLogic) UpdatePod(in *core.UpdatePodReq) (*core.UpdatePodResp, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL