Documentation
¶
Overview ¶
Package transfer implements file copy over SSM SSH sessions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyRemoteToRemote ¶
func CopyRemoteToRemote(ctx context.Context, srcInstanceID, srcPath, dstInstanceID, dstPath string, spec CopySpec) error
CopyRemoteToRemote streams files from srcInstanceID:srcPath to dstInstanceID:dstPath by piping tar over two parallel SSH sessions. Data flows through local memory only — no temp files, no direct instance-to-instance network required.
Both instances must have tar available. spec.User and spec.KeyPath are used for both connections; use --user to override if they differ.
Types ¶
type CopySpec ¶
type CopySpec struct {
LocalPath string
RemotePath string
Direction Direction
Recursive bool
User string // remote OS user (e.g. ec2-user, ubuntu)
KeyPath string // private key path for SSH auth
Profile string // AWS profile, forwarded to --proxy if non-empty
Region string // AWS region, forwarded to --proxy
}
CopySpec describes a file copy operation.
Click to show internal directories.
Click to hide internal directories.