Documentation
¶
Index ¶
Constants ¶
View Source
const ( BufferSize = 8192 // method names to send events with information about exec to the clients. OnExecExit = "onExecExit" OnExecError = "onExecError" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerInfo ¶
type ExecErrorEvent ¶
type ExecErrorEvent struct { event.E `json:"-"` ExecId int `json:"id"` Stack string `json:"stack"` }
func (*ExecErrorEvent) Type ¶
func (*ExecErrorEvent) Type() string
type ExecExitEvent ¶
func (*ExecExitEvent) Type ¶
func (*ExecExitEvent) Type() string
type InitConfigParams ¶
type InitConfigParams struct { ContainerName string `json:"container"` // optional, Will be first suitable container in pod if not set KubeConfigParams `json:"kubeconfig"` }
type KubeConfigParams ¶
type MachineExec ¶
type MachineExec struct { Identifier MachineIdentifier `json:"identifier"` Cmd []string `json:"cmd"` // Supported values for now 'shell', "", "process". If type is empty "", then type will resolved like "shell". Type string `json:"type"` Tty bool `json:"tty"` Cols int `json:"cols"` Rows int `json:"rows"` Cwd string `json:"cwd"` ExitChan chan bool ErrorChan chan error // unique client id, real execId should be hidden from client to prevent serialization ID int `json:"id"` ws_conn.ConnectionHandler MsgChan chan []byte // Todo Refactoring: this code is kubernetes specific. Create separated code layer and move it. Executor remotecommand.Executor SizeChan chan remotecommand.TerminalSize // Todo Refactoring: Create separated code layer and move it. Buffer *line_buffer.LineRingBuffer // BearerToken to have access to the kubernetes api. // For empty value will be created in-cluster config with service account access. BearerToken string }
Todo code Refactoring: MachineExec should be simple object for exec creation, without any business logic
type MachineIdentifier ¶
type MachineIdentifier struct {
MachineName string `json:"machineName"`
}
type ResolvedExec ¶
type ResolvedExec struct { ContainerInfo Cmd []string `json:"cmd"` }
ResolvedExec holds info client might send to create exec
Click to show internal directories.
Click to hide internal directories.