exec

package
v0.0.132-smrctl Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const RESIZE_TYPE = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type Control added in v0.1.56

type Control struct {
	Type int
	Data json.RawMessage
}

func NewControl added in v0.1.56

func NewControl(t int, v any) (*Control, error)

func NewResize added in v0.1.56

func NewResize(width, height int) (*Control, error)

func UnmarshalControl added in v0.1.56

func UnmarshalControl(data []byte) (*Control, error)

func (*Control) DecodeResize added in v0.1.56

func (c *Control) DecodeResize() (*Resize, error)

func (*Control) Marshal added in v0.1.56

func (c *Control) Marshal() ([]byte, error)

type Resize added in v0.1.56

type Resize struct {
	Width  int
	Height int
}

type Session

type Session struct {
	ID         string
	Container  platforms.IContainer
	Reader     *bufio.Reader
	Conn       *net.Conn
	ClientConn *websocket.Conn
	// contains filtered or unexported fields
}

func Create

func Create(c context.Context, cancel context.CancelFunc, clientConn *websocket.Conn, container platforms.IContainer,
	command []string, interactive bool, height string, width string) (*Session, error)

func (*Session) Exec

func (s *Session) Exec() error

func (*Session) Output

func (s *Session) Output(container platforms.IContainer) (types.ExecResult, error)

Jump to

Keyboard shortcuts

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