node

package
v0.26.4 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebsocketMessageType = map[int]string{
	websocket.BinaryMessage: "binary",
	websocket.TextMessage:   "text",
	websocket.CloseMessage:  "close",
	websocket.PingMessage:   "ping",
	websocket.PongMessage:   "pong",
}

Functions

func RegisterActionRoutes added in v0.0.145

func RegisterActionRoutes(r chi.Router)

func RegisterMetadataRoutes added in v0.0.145

func RegisterMetadataRoutes(r chi.Router)

func RegisterResourceRoutes added in v0.0.145

func RegisterResourceRoutes(r chi.Router)

func RegisterShellRoutes added in v0.0.145

func RegisterShellRoutes(api chi.Router)

func RegisterTaintRoutes added in v0.0.145

func RegisterTaintRoutes(r chi.Router)

Types

type ActionController added in v0.0.145

type ActionController struct{}

func (*ActionController) BatchCordon added in v0.0.145

func (nc *ActionController) BatchCordon(c *response.Context)

@Summary 批量将指定的 Kubernetes 节点设置为不可调度(cordon) @Security BearerAuth @Param cluster query string true "集群名称" @Param name_list body []string true "节点名称列表" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/batch/cordon [post]

func (*ActionController) BatchDrain added in v0.0.145

func (nc *ActionController) BatchDrain(c *response.Context)

@Summary 批量驱逐指定的 Kubernetes 节点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name_list body []string true "节点名称列表" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/batch/drain [post]

func (*ActionController) BatchUnCordon added in v0.0.145

func (nc *ActionController) BatchUnCordon(c *response.Context)

@Summary 批量解除指定节点的隔离状态(Uncordon),使其重新可调度 @Security BearerAuth @Param cluster query string true "集群名称" @Param name_list body []string true "节点名称列表" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/batch/uncordon [post]

func (*ActionController) Cordon added in v0.0.145

func (nc *ActionController) Cordon(c *response.Context)

@Summary 隔离指定节点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/cordon/name/{name} [post]

func (*ActionController) Drain added in v0.0.145

func (nc *ActionController) Drain(c *response.Context)

@Summary 驱逐指定节点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/drain/name/{name} [post]

func (*ActionController) UnCordon added in v0.0.145

func (nc *ActionController) UnCordon(c *response.Context)

@Summary 解除指定节点隔离 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/uncordon/name/{name} [post]

type MetadataController added in v0.0.145

type MetadataController struct{}

func (*MetadataController) AllLabelList added in v0.0.145

func (nc *MetadataController) AllLabelList(c *response.Context)

@Summary 获取所有节点上的标签 @Security BearerAuth @Param cluster query string true "集群名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/labels/list [get]

func (*MetadataController) NameOptionList added in v0.0.145

func (nc *MetadataController) NameOptionList(c *response.Context)

@Summary 获取节点名称选项列表 @Security BearerAuth @Param cluster query string true "集群名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/name/option_list [get]

func (*MetadataController) UniqueLabels added in v0.0.145

func (nc *MetadataController) UniqueLabels(c *response.Context)

@Summary 获取选定集群中所有唯一的节点标签键,并以选项列表形式返回 @Security BearerAuth @Param cluster query string true "集群名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/labels/unique_labels [get]

type ResourceController added in v0.0.145

type ResourceController struct{}

func (*ResourceController) TopList added in v0.0.145

func (nc *ResourceController) TopList(c *response.Context)

@Summary 返回所有节点的资源使用率(top指标),包括CPU和内存的用量及其数值化表示,便于前端排序和展示 @Security BearerAuth @Param cluster query string true "集群名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/top/list [get]

func (*ResourceController) Usage added in v0.0.145

func (nc *ResourceController) Usage(c *response.Context)

@Summary 获取节点资源使用情况 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/usage/name/{name} [get]

type ShellController added in v0.0.145

type ShellController struct{}

func (*ShellController) CreateKubectlShell added in v0.0.145

func (nc *ShellController) CreateKubectlShell(c *response.Context)

@Summary 创建kubectl shell @Security BearerAuth @Param cluster query string true "集群名称" @Param node_name path string true "节点名称" @Param cluster_id path string true "集群ID,base64编码" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/name/{node_name}/create_kubectl_shell [post]

func (*ShellController) CreateNodeShell added in v0.0.145

func (nc *ShellController) CreateNodeShell(c *response.Context)

@Summary 创建节点shell @Security BearerAuth @Param cluster query string true "集群名称" @Param node_name path string true "节点名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/name/{node_name}/create_node_shell [post]

type TaintController added in v0.0.145

type TaintController struct{}

func (*TaintController) Add added in v0.0.145

func (tc *TaintController) Add(c *response.Context)

@Summary 添加污点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Param body body TaintInfo true "污点信息" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/add_taints/name/{name} [post]

func (*TaintController) Delete added in v0.0.145

func (tc *TaintController) Delete(c *response.Context)

@Summary 删除污点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Param body body TaintInfo true "污点信息" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/delete_taints/name/{name} [post]

func (*TaintController) List added in v0.0.145

func (tc *TaintController) List(c *response.Context)

@Summary 获取所有节点上的污点 @Security BearerAuth @Param cluster query string true "集群名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/taints/list [get]

func (*TaintController) ListByName added in v0.0.145

func (tc *TaintController) ListByName(c *response.Context)

@Summary 获取某个节点上的污点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/list_taints/name/{name} [get]

func (*TaintController) Update added in v0.0.145

func (tc *TaintController) Update(c *response.Context)

@Summary 修改污点 @Security BearerAuth @Param cluster query string true "集群名称" @Param name path string true "节点名称" @Param body body TaintInfo true "污点信息" @Success 200 {object} string @Router /k8s/cluster/{cluster}/node/update_taints/name/{name} [post]

type TaintInfo added in v0.0.27

type TaintInfo struct {
	Key    string `json:"key"`
	Value  string `json:"value"`
	Effect string `json:"effect"`
}

Jump to

Keyboard shortcuts

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