Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateEd25519Key ¶
GenerateEd25519Key generates an ed25519 key pair and writes to disk. Returns the public key string.
func RestartRemote ¶
func RestartRemote(ctx context.Context, cfg SyncConfig, containerName string) error
RestartRemote runs docker restart on the remote host via SSH.
Types ¶
type SyncConfig ¶
type SyncConfig struct {
Host string
Port int
User string
PrivateKeyPath string
SourceDir string
Exclude []string
DeleteExtra bool
}
SyncConfig holds configuration for a sync operation.
type SyncResult ¶
type SyncResult struct {
Host string `json:"host"`
FilesSent int `json:"files_sent"`
FilesDel int `json:"files_deleted"`
Error string `json:"error,omitempty"`
DurationMs int64 `json:"duration_ms"`
}
SyncResult holds the result of a sync operation.
func Sync ¶
func Sync(ctx context.Context, cfg SyncConfig) (*SyncResult, error)
Sync performs an SFTP sync from source to remote.
Click to show internal directories.
Click to hide internal directories.