Documentation
¶
Index ¶
- type Client
- func (c Client) Connectable(timeout time.Duration) (bool, error)
- func (c Client) RunCommand(command string, options CommandOptions) error
- func (c Client) WithKey(keyfile string) Client
- func (c Client) WithPassword(password string) Client
- func (c Client) WithPort(port string) Client
- func (c Client) WithServer(addr string) Client
- func (c Client) WithUser(user string) Client
- type Clienter
- type CommandOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ssh client
func (Client) Connectable ¶
Connectable check if client can connect to ssh server within timeout
func (Client) RunCommand ¶
func (c Client) RunCommand(command string, options CommandOptions) error
RunCommand run command onto remote server via SSH
func (Client) WithPassword ¶
WithPassword with key
type Clienter ¶
type Clienter interface { WithServer(add string) Client WithUser(user string) Client WithPassword(password string) Client WithKey(key string) Client WithPort(port string) Client Connectable(timeout time.Duration) (bool, error) RunCommand(command string, options CommandOptions) error }
Clienter defines interface of SSH client
Click to show internal directories.
Click to hide internal directories.