Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateAttachHandler ¶
func WaitForTerminal ¶
func WaitForTerminal(k8sClient *kubernetes.Clientset, cfg *rest.Config, ts TerminalSession, namespace, pod, container, cmd string)
Types ¶
type KubePodController ¶
type KubePodController struct {
base.APIController
}
func (*KubePodController) Delete ¶
func (c *KubePodController) Delete()
@Title Delete @Description delete the Pod @Param cluster path string true "the cluster want to delete" @Param namespace path string true "the namespace want to delete" @Param pod path string true "the pod name want to delete" @Success 200 {string} delete success! @router /:pod/namespaces/:namespace/clusters/:cluster [delete]
func (*KubePodController) Get ¶
func (c *KubePodController) Get()
@Title Get @Description find Deployment by cluster @Success 200 {object} models.Deployment success @router /:pod/namespaces/:namespace/clusters/:cluster [get]
func (*KubePodController) List ¶
func (c *KubePodController) List()
@Title List @Description find pods by deployment @Param deployment query string true "the deployment name." @Param statefulset query string true "the statefulset name." @Success 200 {object} models.Deployment success @router /namespaces/:namespace/clusters/:cluster [get]
func (*KubePodController) PodStatistics ¶
func (c *KubePodController) PodStatistics()
@Title kubernetes pod statistics @Description kubernetes statistics @Param cluster query string false "the cluster " @Success 200 {object} models.AppCount success
func (*KubePodController) Prepare ¶
func (c *KubePodController) Prepare()
func (*KubePodController) Terminal ¶
func (c *KubePodController) Terminal()
@Title Create terminal @Param cmd query string true "the cmd you want to exec." @Param container query string true "the container name." @Description create container terminal @router /:pod/terminal/namespaces/:namespace/clusters/:cluster [post]
func (*KubePodController) URLMapping ¶
func (c *KubePodController) URLMapping()
type PtyHandler ¶
type PtyHandler interface { io.Reader io.Writer remotecommand.TerminalSizeQueue }
type TerminalMessage ¶
type TerminalResult ¶
type TerminalResult struct { SessionId string `json:"sessionId,omitempty"` Token string `json:"token,omitempty"` Cluster string `json:"cluster,omitempty"` Namespace string `json:"namespace,omitempty"` Pod string `json:"pod,omitempty"` Container string `json:"container,omitempty"` Cmd string `json:"cmd,omitempty"` }
type TerminalSession ¶
type TerminalSession struct {
// contains filtered or unexported fields
}
func (TerminalSession) Close ¶
func (t TerminalSession) Close(status uint32, reason string)
func (TerminalSession) Next ¶
func (t TerminalSession) Next() *remotecommand.TerminalSize