pod

package
v1.8.4 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2019 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) 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 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