Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var UserSFTPOptions = SFTPOptions{
BufferSizeKib: 32,
RequestsPerFile: 64,
}
UserSFTPOptions changes how the SFTP subsystem will be configured for copying files.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
type Actor struct {
// contains filtered or unexported fields
}
An Actor is able to perform actions on a remote via an SSH connection established to the host.
func (*Actor) CopyFileToRemote ¶
func (a *Actor) CopyFileToRemote(localSource *os.File, remoteFilePath string, mode os.FileMode) error
CopyFileToRemote copies the file to the Actor's remote host at the remote file path.
func (*Actor) CreateRemoteDir ¶
CreateRemoteDir creates the dir as well as any nonexistent parents on the Actor's remote host if any of the dirs do not exist. Return nil if the paths already exist.
type Connector ¶
type Connector struct {
// contains filtered or unexported fields
}
A Connector is able to make SSH connections to remote hosts.
func (*Connector) AddIdentityFile ¶
AddIdentityFile adds the identity file's key to the remote authentication methods ssh will try when connecting to remote hosts.
func (*Connector) Connect ¶
Connect connects to the host via ssh with the options that have been previously set and returns an actor which can be called to perform tasks on the remote host.
type SFTPOptions ¶ added in v1.1.0
SFTPOptions is defines options for SSH's SFTP subsystem.