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) 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 type query string true "the query type. deployment, statefulset, daemonSet, job, pod" @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