svc

package
v0.26.9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterActionRoutes added in v0.0.145

func RegisterActionRoutes(r chi.Router)

func RegisterPortForwardRoutes added in v0.26.9

func RegisterPortForwardRoutes(r chi.Router)

RegisterPortForwardRoutes 注册 Service 端口转发相关路由。

Types

type ActionController added in v0.0.145

type ActionController struct{}

func (*ActionController) Create added in v0.0.145

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

@Summary 创建Service @Security BearerAuth @Param cluster query string true "集群名称" @Param body body object true "Service创建参数" @Success 200 {object} string @Router /k8s/cluster/{cluster}/service/create [post] Create 创建Service接口

type PortForwardController added in v0.26.9

type PortForwardController struct{}

func (*PortForwardController) PortForwardList added in v0.26.9

func (pc *PortForwardController) PortForwardList(c *response.Context)

PortForwardList 返回 Service 各端口的转发状态列表。

func (*PortForwardController) StartPortForward added in v0.26.9

func (pc *PortForwardController) StartPortForward(c *response.Context)

StartPortForward 根据 Service 的 selector 找到第一个 Pod,并发起端口转发。

func (*PortForwardController) StopPortForward added in v0.26.9

func (pc *PortForwardController) StopPortForward(c *response.Context)

StopPortForward 停止 Service 对应端口的转发。

type ServicePortForwardItem added in v0.26.9

type ServicePortForwardItem struct {
	PortName    string `json:"port_name"`
	ServicePort string `json:"svc_port"`
	TargetPort  string `json:"target_port"`
	Protocol    string `json:"protocol"`
	LocalPort   string `json:"local_port"`
	Status      string `json:"status"`
	PodName     string `json:"pod_name"`
}

Jump to

Keyboard shortcuts

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