Documentation
¶
Index ¶
Constants ¶
View Source
const (
APIVersion = "nsh/v1alpha1"
)
Variables ¶
View Source
var MaxDataMessageBytes int
MaxDataMessageBytes is the maximum number of bytes that can be sent in a single data message.
Functions ¶
This section is empty.
Types ¶
type Ack ¶
type Ack struct {
message.Meta `json:",inline" mapstructure:",squash"`
// Status is the status of the acknowledgment.
Status AckStatus `json:"status" mapstructure:"status"`
// Reason is the reason for the status, typically populated for errors.
Reason string `json:"reason,omitempty" mapstructure:"reason,omitempty"`
}
Ack acknowledges a message has been received and processed.
func (*Ack) GetAPIVersion ¶
type AckStatus ¶
type AckStatus string
AckStatus is the status of an acknowledgment.
const ( // AckStatusOK indicates the message was processed successfully. AckStatusOK AckStatus = "OK" // AckStatusError indicates an error occurred while processing the message. AckStatusError AckStatus = "ERROR" // AckStatusUnimplemented indicates the message was not processed because // the feature / message type is not implemented. AckStatusUnimplemented AckStatus = "UNIMPLEMENTED" )
type Data ¶
type Data struct {
message.Meta `json:",inline" mapstructure:",squash"`
// Data is the base64 encoded terminal data.
Data string `json:"data" mapstructure:"data"`
}
Data is a message containing terminal data.
func (*Data) GetAPIVersion ¶
type TerminalExit ¶
type TerminalExit struct {
message.Meta `json:",inline" mapstructure:",squash"`
// Status is the exit status of the shell process.
Status int `json:"status" mapstructure:"status"`
}
TerminalExit indicates the terminal session / shell has exited.
func (*TerminalExit) GetAPIVersion ¶
func (e *TerminalExit) GetAPIVersion() string
func (*TerminalExit) GetKind ¶
func (e *TerminalExit) GetKind() string
type TerminalOpenRequest ¶
type TerminalOpenRequest struct {
message.Meta `json:",inline" mapstructure:",squash"`
// Columns is the number of columns in the terminal.
Columns int `json:"columns" mapstructure:"columns"`
// Rows is the number of rows in the terminal.
Rows int `json:"rows" mapstructure:"rows"`
// Env is a list of environment variables to pass to the shell process.
// Uncontrolled setting of environment variables in a privileged process
// can be a security hazard. Server implementations must validate the
// environment variables before passing them to the shell process.
// Typical safe values include TERM, LANG, and LC_*.
Env []string `json:"env,omitempty" mapstructure:"env,omitempty"`
}
TerminalOpenRequest requests a new terminal session.
func (*TerminalOpenRequest) GetAPIVersion ¶
func (o *TerminalOpenRequest) GetAPIVersion() string
func (*TerminalOpenRequest) GetKind ¶
func (o *TerminalOpenRequest) GetKind() string
type TerminalResize ¶
type TerminalResize struct {
message.Meta `json:",inline" mapstructure:",squash"`
// Columns is the number of columns in the terminal.
Columns int `json:"columns" mapstructure:"columns"`
// Rows is the number of rows in the terminal.
Rows int `json:"rows" mapstructure:"rows"`
}
TerminalResize resizes the terminal window.
func (*TerminalResize) GetAPIVersion ¶
func (r *TerminalResize) GetAPIVersion() string
func (*TerminalResize) GetKind ¶
func (r *TerminalResize) GetKind() string
Click to show internal directories.
Click to hide internal directories.