Documentation
¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) ControlPath() string
- func (c *Client) CopyBinaryToRemote(localPath, remoteBaseDir string) (string, error)
- func (c *Client) DetectSystem() (string, string, error)
- func (c *Client) GetRemoteRepositoryDir() (string, error)
- func (c *Client) Host() string
- func (c *Client) Run(command string, optFuncs ...RunOption) error
- func (c *Client) RunCommand(command string, optFuncs ...RunOption) (string, string, error)
- func (c *Client) SyncDirectoryToRemote(remoteBaseDir string) (string, error)
- type RunOption
- type SSHOption
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 manages an SSH connection to a specific remote host.
func (*Client) Close ¶
func (c *Client) Close()
Close closes the SSH connection and cleans up the control socket.
func (*Client) ControlPath ¶
ControlPath returns the SSH control socket path.
func (*Client) CopyBinaryToRemote ¶
CopyBinaryToRemote copies a local binary to the remote host and makes it executable.
func (*Client) DetectSystem ¶
DetectSystem detects the OS and architecture of the remote system.
func (*Client) GetRemoteRepositoryDir ¶
GetRemoteRepositoryDir determines the remote directory path for the current repository.
func (*Client) RunCommand ¶
RunCommand executes a command on the remote host and returns the output.
type SSHOption ¶
type SSHOption func(*Client)
SSHOption is a function that configures an SSH client.
func WithExtraOptions ¶
WithExtraOptions adds extra SSH options to the connection.
func WithIdentityFile ¶
WithIdentityFile sets the identity file (private key) to use for authentication.
func WithKnownHostsFile ¶
WithKnownHostsFile sets the known hosts file to use for host verification.
func WithProxyCommand ¶
WithProxyCommand sets a proxy command for the SSH connection.