Documentation
¶
Index ¶
- func CreateAttachHandler(path string) http.Handler
- func WaitForTerminal(k8sClient *kubernetes.Clientset, cfg *rest.Config, ts TerminalSession, ...)
- type KubePodController
- func (c *KubePodController) Create()
- func (c *KubePodController) Delete()
- func (c *KubePodController) Get()
- func (c *KubePodController) List()
- func (c *KubePodController) PodStatistics()
- func (c *KubePodController) Prepare()
- func (c *KubePodController) Terminal()
- func (c *KubePodController) URLMapping()
- type PtyHandler
- type TerminalMessage
- type TerminalResult
- type TerminalSession
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) Create ¶ added in v1.0.9
func (c *KubePodController) Create()
@Title Create @Description create the pod @Param cluster path string true "the cluster want to create" @Param namespace path string true "the namespace want to create" @Param name path string true "the pod name want to create" @Param nodename path string true "the pod annodeName want to create" @Param nodeshellimage path string true "the node shell image" @Success 200 return ok success @router /namespaces/:namespace/clusters/:cluster [post]
func (*KubePodController) Delete ¶ added in v1.0.9
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 name path string true "the pod name want to delete" @Success 200 {string} delete success! @router /namespaces/:namespace/clusters/:cluster [delete]
func (*KubePodController) Get ¶ added in v1.0.9
func (c *KubePodController) Get()
@Title Get @Description find Pod by cluster @Param cluster path string true "the cluster name" @Param namespace path string true "the namespace name" @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 resource type @Param pageNo query int false "the page current no" @Param pageSize query int false "the page size" @Param name query string true "the query resource 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