agenttransfer

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SFTPProvider

type SFTPProvider func() *sftp.Client

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL