cluster

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDetail

func GetDetail(clusterMgr *cluster.ClusterManager, c *server.CompletedConfig) http.HandlerFunc

func GetNamespace

func GetNamespace(clusterMgr *cluster.ClusterManager, c *server.CompletedConfig) http.HandlerFunc

func GetNamespaceTopology

func GetNamespaceTopology(clusterMgr *cluster.ClusterManager, c *server.CompletedConfig) http.HandlerFunc

func GetTopology

func GetTopology(clusterMgr *cluster.ClusterManager, c *server.CompletedConfig) http.HandlerFunc

func GetYAML

func UpdateKubeConfig added in v0.2.6

func UpdateKubeConfig(w http.ResponseWriter, r *http.Request)

@Summary Upload kubeConfig file for cluster @Description Uploads a KubeConfig file for cluster, with a maximum size of 2MB, and the valid file extension is "", ".yaml", ".yml", ".json", ".kubeconfig", ".kubeconf". @Tags cluster @Accept multipart/form-data @Produce plain @Param file formData file true "Upload file with field name 'file'" @Success 200 {object} UploadData "Returns the content of the uploaded KubeConfig file." @Failure 400 {string} string "The uploaded file is too large or the request is invalid." @Failure 500 {string} string "Internal server error." @Router /api/v1/cluster/config/file [post]

Types

type UploadData added in v0.2.6

type UploadData struct {
	FileName string `json:"fileName"`
	FileSize int    `json:"fileSize"`
	Content  string `json:"content"`
}

Jump to

Keyboard shortcuts

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