Documentation ¶
Index ¶
- Constants
- func CheckLocalPath(path string) (string, error)
- func CreateEmptyTmpFile() (string, error)
- type Agent
- type Check
- type Command
- func (c *Command) Cmd() *Command
- func (c *Command) CombinedOutput() ([]byte, error)
- func (c *Command) OnCommandStart(fn func()) *Command
- func (c *Command) Output() ([]byte, []byte, error)
- func (c *Command) Sudo() *Command
- func (c *Command) WithSSHArgs(args ...string) *Command
- func (c *Command) WithTimeout(timeout time.Duration) *Command
- type File
- type KubeProxy
- type ReverseTunnel
- type Tunnel
- type UploadScript
- func (u *UploadScript) Execute() (stdout []byte, err error)
- func (u *UploadScript) ExecuteBundle(parentDir, bundleDir string) (stdout []byte, err error)
- func (u *UploadScript) Sudo() *UploadScript
- func (u *UploadScript) WithEnvs(envs map[string]string) *UploadScript
- func (u *UploadScript) WithStdoutHandler(handler func(string)) *UploadScript
- func (u *UploadScript) WithTimeout(timeout time.Duration) *UploadScript
Constants ¶
View Source
const DefaultLocalAPIPort = 22322
Variables ¶
This section is empty.
Functions ¶
func CheckLocalPath ¶
CheckLocalPath see if file exists and determine if it is a directory. Error is returned if file is not exists.
func CreateEmptyTmpFile ¶
Types ¶
type Agent ¶
type Agent struct { AgentSettings *session.AgentSettings Agent *cmd.SSHAgent }
func NewAgent ¶
func NewAgent(sess *session.AgentSettings) *Agent
type Check ¶
func (*Check) AwaitAvailability ¶
func (*Check) ExpectAvailable ¶
func (*Check) WithDelaySeconds ¶
type Command ¶
type Command struct { *process.Executor Session *session.Session Name string Args []string Env []string SSHArgs []string // contains filtered or unexported fields }
func (*Command) CombinedOutput ¶
func (*Command) OnCommandStart ¶
func (*Command) WithSSHArgs ¶
type File ¶
func (*File) DownloadBytes ¶
Download remote file and returns its content as an array of bytes.
type KubeProxy ¶
type KubeProxy struct { Session *session.Session KubeProxyPort string LocalPort string // contains filtered or unexported fields }
func NewKubeProxy ¶
type ReverseTunnel ¶
type ReverseTunnel struct { Session *session.Session Address string // contains filtered or unexported fields }
func NewReverseTunnel ¶
func NewReverseTunnel(sess *session.Session, address string) *ReverseTunnel
func (*ReverseTunnel) Stop ¶
func (t *ReverseTunnel) Stop() error
func (*ReverseTunnel) String ¶
func (t *ReverseTunnel) String() string
func (*ReverseTunnel) Up ¶
func (t *ReverseTunnel) Up() error
type Tunnel ¶
type Tunnel struct { Session *session.Session Type string // Remote or Local Address string // contains filtered or unexported fields }
func (*Tunnel) HealthMonitor ¶
type UploadScript ¶
type UploadScript struct { Session *session.Session ScriptPath string Args []string // contains filtered or unexported fields }
func NewUploadScript ¶
func NewUploadScript(sess *session.Session, scriptPath string, args ...string) *UploadScript
func (*UploadScript) Execute ¶
func (u *UploadScript) Execute() (stdout []byte, err error)
func (*UploadScript) ExecuteBundle ¶
func (u *UploadScript) ExecuteBundle(parentDir, bundleDir string) (stdout []byte, err error)
func (*UploadScript) Sudo ¶
func (u *UploadScript) Sudo() *UploadScript
func (*UploadScript) WithEnvs ¶
func (u *UploadScript) WithEnvs(envs map[string]string) *UploadScript
func (*UploadScript) WithStdoutHandler ¶
func (u *UploadScript) WithStdoutHandler(handler func(string)) *UploadScript
func (*UploadScript) WithTimeout ¶
func (u *UploadScript) WithTimeout(timeout time.Duration) *UploadScript
Click to show internal directories.
Click to hide internal directories.