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) IsNeedShowInfo() bool
- func (c BaseCommand) Reconnect()
- func (c BaseCommand) Scan(byte, func(msg string))
- func (c BaseCommand) ShowInfo() string
- type ICommand
- type IpmiInfo
- type IpmitoolSol
- type K8sEnv
- type Kubectl
- type KubectlExec
- type KubectlLog
- type SSHtoolSol
- func (c *SSHtoolSol) Cleanup() error
- func (c *SSHtoolSol) Connect() error
- func (c *SSHtoolSol) GetClientSession() *mcclient.ClientSession
- func (c *SSHtoolSol) GetCommand() *exec.Cmd
- func (c *SSHtoolSol) GetProtocol() string
- func (c *SSHtoolSol) GetRecordObject() *recorder.Object
- func (c *SSHtoolSol) IsNeedShowInfo() bool
- func (c *SSHtoolSol) Reconnect()
- func (c *SSHtoolSol) Scan(d byte, send func(msg string))
- func (c *SSHtoolSol) ShowInfo() string
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) IsNeedShowInfo ¶
func (c BaseCommand) IsNeedShowInfo() bool
func (BaseCommand) Reconnect ¶
func (c BaseCommand) Reconnect()
func (BaseCommand) Scan ¶
func (c BaseCommand) Scan(byte, func(msg string))
func (BaseCommand) ShowInfo ¶
func (c BaseCommand) ShowInfo() string
type ICommand ¶
type ICommand interface { GetProtocol() string GetCommand() *exec.Cmd Cleanup() error Reconnect() IsNeedShowInfo() bool ShowInfo() string 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 // 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) GetProtocol ¶
func (*Kubectl) Logs ¶
func (c *Kubectl) Logs() *KubectlLog
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 SSHtoolSol ¶
type SSHtoolSol struct { *BaseCommand IP string Port int // contains filtered or unexported fields }
func NewSSHtoolSolCommand ¶
func NewSSHtoolSolCommand(ctx context.Context, us *mcclient.ClientSession, ip string, body jsonutils.JSONObject) (*SSHtoolSol, error)
func (*SSHtoolSol) Cleanup ¶
func (c *SSHtoolSol) Cleanup() error
func (*SSHtoolSol) Connect ¶
func (c *SSHtoolSol) Connect() error
func (*SSHtoolSol) GetClientSession ¶
func (c *SSHtoolSol) GetClientSession() *mcclient.ClientSession
func (*SSHtoolSol) GetCommand ¶
func (c *SSHtoolSol) GetCommand() *exec.Cmd
func (*SSHtoolSol) GetProtocol ¶
func (c *SSHtoolSol) GetProtocol() string
func (*SSHtoolSol) GetRecordObject ¶
func (c *SSHtoolSol) GetRecordObject() *recorder.Object
func (*SSHtoolSol) IsNeedShowInfo ¶
func (c *SSHtoolSol) IsNeedShowInfo() bool
func (*SSHtoolSol) Reconnect ¶
func (c *SSHtoolSol) Reconnect()
func (*SSHtoolSol) Scan ¶
func (c *SSHtoolSol) Scan(d byte, send func(msg string))
func (*SSHtoolSol) ShowInfo ¶
func (c *SSHtoolSol) ShowInfo() string
Click to show internal directories.
Click to hide internal directories.