Documentation ¶
Index ¶
- Constants
- type BaseCommand
- func (c *BaseCommand) AppendArgs(args ...string) *BaseCommand
- func (c BaseCommand) Cleanup() error
- func (c *BaseCommand) GetClientSession() *mcclient.ClientSession
- func (c BaseCommand) GetCommand() *exec.Cmd
- func (c BaseCommand) GetRecordObject() *recorder.Object
- func (c BaseCommand) Scan(byte, func(msg string))
- type ClimcSshCommand
- type ICommand
- type IpmiInfo
- type IpmitoolSol
- type K8sEnv
- type Kubectl
- func (c *Kubectl) Cleanup() error
- func (c *Kubectl) Exec() *KubectlExec
- func (c *Kubectl) GetCommand() *exec.Cmd
- func (c *Kubectl) GetIPs() []string
- func (c *Kubectl) GetInstanceName() string
- func (c Kubectl) GetProtocol() string
- func (c *Kubectl) Logs() *KubectlLog
- func (c *Kubectl) SetIPs(ips []string)
- func (c *Kubectl) SetInstanceName(name string)
- type KubectlExec
- type KubectlLog
- type SAdbShellCommand
- type SAdbShellInfo
- type SocatCmd
- type SocatInfo
Constants ¶
View Source
const (
PROTOCOL_TTY string = "tty"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseCommand ¶
type BaseCommand struct {
// contains filtered or unexported fields
}
func NewBaseCommand ¶
func NewBaseCommand(s *mcclient.ClientSession, name string, args ...string) *BaseCommand
func (*BaseCommand) AppendArgs ¶
func (c *BaseCommand) AppendArgs(args ...string) *BaseCommand
func (BaseCommand) Cleanup ¶
func (c BaseCommand) Cleanup() error
func (*BaseCommand) GetClientSession ¶
func (c *BaseCommand) GetClientSession() *mcclient.ClientSession
func (BaseCommand) GetCommand ¶
func (c BaseCommand) GetCommand() *exec.Cmd
func (BaseCommand) GetRecordObject ¶
func (c BaseCommand) GetRecordObject() *recorder.Object
func (BaseCommand) Scan ¶
func (c BaseCommand) Scan(byte, func(msg string))
type ClimcSshCommand ¶
type ClimcSshCommand struct { *BaseCommand Info *webconsole.ClimcSshInfo // contains filtered or unexported fields }
func NewClimcSshCommand ¶
func NewClimcSshCommand(info *webconsole.ClimcSshInfo, s *mcclient.ClientSession) (*ClimcSshCommand, error)
func (ClimcSshCommand) Cleanup ¶
func (c ClimcSshCommand) Cleanup() error
func (ClimcSshCommand) GetCommand ¶
func (c ClimcSshCommand) GetCommand() *exec.Cmd
func (ClimcSshCommand) GetIPs ¶
func (c ClimcSshCommand) GetIPs() []string
func (ClimcSshCommand) GetInstanceName ¶
func (c ClimcSshCommand) GetInstanceName() string
func (ClimcSshCommand) GetProtocol ¶
func (c ClimcSshCommand) GetProtocol() string
func (*ClimcSshCommand) Scan ¶
func (c *ClimcSshCommand) Scan(d byte, send func(msg string))
type ICommand ¶
type ICommand interface { GetProtocol() string GetCommand() *exec.Cmd Cleanup() error Scan(d byte, send func(msg string)) GetClientSession() *mcclient.ClientSession GetRecordObject() *recorder.Object }
func NewPodBashCommand ¶
func NewPodLogCommand ¶
type IpmitoolSol ¶
type IpmitoolSol struct { *BaseCommand Info *IpmiInfo // contains filtered or unexported fields }
func NewIpmitoolSolCommand ¶
func NewIpmitoolSolCommand(info *IpmiInfo, s *mcclient.ClientSession) (*IpmitoolSol, error)
func (*IpmitoolSol) GetCommand ¶
func (c *IpmitoolSol) GetCommand() *exec.Cmd
func (IpmitoolSol) GetProtocol ¶
func (c IpmitoolSol) GetProtocol() string
type K8sEnv ¶
type K8sEnv struct { Session *mcclient.ClientSession Cluster string Namespace string Pod string Container string Kubeconfig string Data jsonutils.JSONObject }
type Kubectl ¶
type Kubectl struct { *BaseCommand // For display info InstanceName string IPs []string // contains filtered or unexported fields }
func NewKubectlCommand ¶
func NewKubectlCommand(s *mcclient.ClientSession, kubeconfig, namespace string) *Kubectl
func (*Kubectl) Exec ¶
func (c *Kubectl) Exec() *KubectlExec
func (*Kubectl) GetCommand ¶
func (*Kubectl) GetInstanceName ¶
func (Kubectl) GetProtocol ¶
func (*Kubectl) Logs ¶
func (c *Kubectl) Logs() *KubectlLog
func (*Kubectl) SetInstanceName ¶
type KubectlExec ¶
type KubectlExec struct {
*Kubectl
}
func (*KubectlExec) Command ¶
func (c *KubectlExec) Command(cmd string, args ...string) *KubectlExec
func (*KubectlExec) Container ¶
func (c *KubectlExec) Container(name string) *KubectlExec
func (*KubectlExec) Pod ¶
func (c *KubectlExec) Pod(name string) *KubectlExec
func (*KubectlExec) Stdin ¶
func (c *KubectlExec) Stdin() *KubectlExec
func (*KubectlExec) TTY ¶
func (c *KubectlExec) TTY() *KubectlExec
type KubectlLog ¶
type KubectlLog struct {
*Kubectl
}
func (*KubectlLog) Container ¶
func (c *KubectlLog) Container(name string) *KubectlLog
func (*KubectlLog) Follow ¶
func (c *KubectlLog) Follow() *KubectlLog
func (*KubectlLog) Pod ¶
func (c *KubectlLog) Pod(name string) *KubectlLog
func (*KubectlLog) Since ¶
func (c *KubectlLog) Since(data jsonutils.JSONObject) *KubectlLog
type SAdbShellCommand ¶
type SAdbShellCommand struct { *BaseCommand Info *SAdbShellInfo // contains filtered or unexported fields }
func NewAdbShellCommand ¶
func NewAdbShellCommand(info *SAdbShellInfo, s *mcclient.ClientSession) (*SAdbShellCommand, error)
func (*SAdbShellCommand) Cleanup ¶
func (c *SAdbShellCommand) Cleanup() error
func (*SAdbShellCommand) GetCommand ¶
func (c *SAdbShellCommand) GetCommand() *exec.Cmd
func (SAdbShellCommand) GetProtocol ¶
func (c SAdbShellCommand) GetProtocol() string
type SAdbShellInfo ¶
type SocatCmd ¶
type SocatCmd struct { *BaseCommand Info *SocatInfo // contains filtered or unexported fields }
func NewSocatCommand ¶
func NewSocatCommand(info *SocatInfo, s *mcclient.ClientSession) (*SocatCmd, error)
func (*SocatCmd) GetCommand ¶
func (*SocatCmd) GetProtocol ¶
Click to show internal directories.
Click to hide internal directories.