Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PasswordAuth indicates password-based authentication PasswordAuth = "passwordAuth" // KeyAuth indicates key-based authentication KeyAuth = "keyAuth" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileManager ¶
type FileManager interface { Upload(localFilePath, remoteDir string) error Download(remoteFilePath, localDir string) error Delete(remoteFilePath string) error }
FileManager is an interface for managing files on a remote server
func NewFileManager ¶
func NewFileManager(config *SSHConfig, opts ...Option) (FileManager, error)
NewFileManager is not concurrent safe. It should not be used from multiple goroutines concurrently without additional synchronization.
type Option ¶ added in v0.32.0
type Option func(impl *fileManagerImpl)
func WithRetryOnIdleConnection ¶ added in v0.32.0
func WithRetryOnIdleConnection() Option
WithRetryOnIdleConnection enables retrying the operation once in case of a "connection lost" error due to an idle connection.
Click to show internal directories.
Click to hide internal directories.