controllers

package
v0.0.0-...-e19ca05 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2023 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EVT_RESIZE = "resize"
)

Variables

This section is empty.

Functions

func Index

func Index(c *gin.Context)

func Pods

func Pods(c *gin.Context)

func RunTerminal

func RunTerminal(ctx context.Context, conn *WsConn, pod *v1.Pod, shell string) error

func WsProcess

func WsProcess(c *gin.Context)

Types

type Event

type Event struct {
	Type string
	Data interface{}
}

type Size

type Size struct {
	Cols uint16 `json:"cols"`
	Rows uint16 `json:"rows"`
}

type StreamHandler

type StreamHandler struct {
	// contains filtered or unexported fields
}

func NewStreamHandler

func NewStreamHandler(wsConn *WsConn) *StreamHandler

func (*StreamHandler) Next

func (*StreamHandler) Read

func (s *StreamHandler) Read(p []byte) (int, error)

func (*StreamHandler) Write

func (s *StreamHandler) Write(p []byte) (int, error)

type WsConn

type WsConn struct {
	// contains filtered or unexported fields
}

func NewWsConn

func NewWsConn(ctx *gin.Context) (*WsConn, error)

func (*WsConn) Close

func (w *WsConn) Close()

func (*WsConn) Read

func (w *WsConn) Read() (int, []byte, error)

func (*WsConn) ReadLoop

func (w *WsConn) ReadLoop()

func (*WsConn) Write

func (w *WsConn) Write(msgType int, data []byte) error

func (*WsConn) WriteLoop

func (w *WsConn) WriteLoop()

type WsMsg

type WsMsg struct {
	MsgType int
	Data    []byte
}

Jump to

Keyboard shortcuts

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