Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SFTPProvider ¶
SFTPProvider returns the current SFTP client.
type Transferer ¶
type Transferer struct {
// contains filtered or unexported fields
}
Transferer uploads the agent binary to the remote host and caches it by SHA-256 hash so repeat uploads are skipped.
func New ¶
func New(sftp SFTPProvider, localPath, remotePath string, log *slog.Logger) *Transferer
New creates a Transferer. localPath is the path to the pre-built agent binary on the local machine. remotePath is where it will be placed on the remote host.
func (*Transferer) Ensure ¶
func (t *Transferer) Ensure() (string, error)
Ensure uploads the agent binary if it is not already present (or has changed). Returns the remote path.
Click to show internal directories.
Click to hide internal directories.