pod

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateAttachHandler

func CreateAttachHandler(path string) http.Handler

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 TerminalMessage struct {
	Op, Data, SessionID string
	Rows, Cols          uint16
}

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 (TerminalSession) Read

func (t TerminalSession) Read(p []byte) (int, error)

func (TerminalSession) Write

func (t TerminalSession) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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