cmd

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Complete added in v0.3.0

func Complete()

shortcut to the hidden subcomand used for completion

func ContainerValidArgs added in v0.3.0

func ContainerValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func Execute

func Execute()

func MainValidArgs added in v0.3.0

func MainValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func NamespaceValidArgs added in v0.3.0

func NamespaceValidArgs(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func NewCliSession added in v0.3.0

func NewCliSession(o *Options) (*cliSession, error)

Types

type ApiServerError

type ApiServerError struct {
	Reason  string `json:"reason"`
	Message string `json:"message"`
}

type Options

type Options struct {
	Command   []string
	Container string
	Kconfig   string
	Namespace string
	Object    string
	Pod       string
	Stdin     bool
	TTY       bool
	PodSpec   corev1.PodSpec

	Loglevel    int
	Impersonate string
	Context     string
	// contains filtered or unexported fields
}

type TerminalSize

type TerminalSize struct {
	Width  int `json:"Width"`
	Height int `json:"Height"`
}

type TerminalState

type TerminalState struct {
	Size        TerminalSize
	StdInFd     uintptr
	StdOutFd    uintptr
	StateBlob   *term.State
	Initialised bool
	IsRaw       bool
}

type WebsocketRoundTripper

type WebsocketRoundTripper struct {
	Dialer     *websocket.Dialer
	TermState  *TerminalState
	SendBuffer bytes.Buffer
	OneShot    bool
}

func (*WebsocketRoundTripper) RoundTrip

func (d *WebsocketRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

func (*WebsocketRoundTripper) WsCallback

func (d *WebsocketRoundTripper) WsCallback(ws *websocket.Conn) error

Jump to

Keyboard shortcuts

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