handlers

package
v0.0.0-...-060618c Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PodHandler

type PodHandler struct {
	// contains filtered or unexported fields
}

func NewPodHandler

func NewPodHandler(svc *service.PodService) *PodHandler

func (*PodHandler) CreatePod

func (h *PodHandler) CreatePod(c *gin.Context)

CreatePod 创建Pod @Summary 创建新Pod @Tags Pods @Accept json @Param namespace path string true "Namespace" @Param pod body models.CreatePodRequest true "Pod配置" @Success 201 {object} models.PodResponse @Router /api/v1/namespaces/{namespace}/pods [post]

func (*PodHandler) DeletePod

func (h *PodHandler) DeletePod(c *gin.Context)

DeletePod 删除Pod @Summary 删除指定Pod @Tags Pods @Param namespace path string true "Namespace" @Param name path string true "Pod名称" @Success 204 @Router /api/v1/namespaces/{namespace}/pods/{name} [delete]

func (*PodHandler) GetPod

func (h *PodHandler) GetPod(c *gin.Context)

GetPod 获取Pod详情 @Summary 获取Pod详情 @Tags Pods @Param namespace path string true "Namespace" @Param name path string true "Pod名称" @Success 200 {object} models.PodResponse @Router /api/v1/namespaces/{namespace}/pods/{name} [get]

func (*PodHandler) ListPods

func (h *PodHandler) ListPods(c *gin.Context)

ListPods 列出Pod @Summary 列出命名空间下的所有Pod @Tags Pods @Param namespace path string true "Namespace" @Param labelSelector query string false "标签选择器" @Param limit query int false "返回数量限制" @Success 200 {object} models.PodListResponse @Router /api/v1/namespaces/{namespace}/pods [get]

func (*PodHandler) UpdatePod

func (h *PodHandler) UpdatePod(c *gin.Context)

UpdatePod 更新Pod @Summary 更新现有Pod @Tags Pods @Accept json @Param namespace path string true "Namespace" @Param name path string true "Pod名称" @Param pod body models.UpdatePodRequest true "更新配置" @Success 200 {object} models.PodResponse @Router /api/v1/namespaces/{namespace}/pods/{name} [put]

func (*PodHandler) WatchPods

func (h *PodHandler) WatchPods(c *gin.Context)

WatchPods 监听Pod变化 @Summary 实时监听Pod变化 @Tags Pods @Param namespace path string true "Namespace" @Param labelSelector query string false "标签选择器" @Success 200 {object} models.WatchEvent @Router /api/v1/watch/namespaces/{namespace}/pods [get]

Jump to

Keyboard shortcuts

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