Documentation
¶
Index ¶
- type Option
- type Sync
- func NewDiskSync(opt Option) (s Sync, err error)
- func NewEmptySync(opt Option) (s Sync, err error)
- func NewMinIOPullClientSync(opt Option) (Sync, error)
- func NewMinIOPushClientSync(opt Option) (Sync, error)
- func NewPushClientSync(opt Option) (Sync, error)
- func NewRemoteClientSync(opt Option) (Sync, error)
- func NewRemoteServerSync(opt Option) (Sync, error)
- func NewRemoteSync(opt Option) (Sync, error)
- func NewSftpPullClientSync(opt Option) (Sync, error)
- func NewSftpPushClientSync(opt Option) (Sync, error)
- func NewSync(opt Option) (Sync, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶ added in v0.4.1
type Option struct { Source core.VFS Dest core.VFS EnableHTTP3 bool FileServerAddr string EnableTLS bool TLSCertFile string TLSKeyFile string TLSInsecureSkipVerify bool EnableLogicallyDelete bool ChunkSize int64 CheckpointCount int ForceChecksum bool ChecksumAlgorithm string Progress bool MaxTranRate int64 DryRun bool SSHKey string TokenSecret string Users []*auth.User Retry retry.Retry EncOpt encrypt.Option PathIgnore ignore.PathIgnore Reporter report.Reporter TaskConf string }
Option the sync component option
type Sync ¶
type Sync interface { // Create create the path Create(path string) error // Symlink create a symbolic link Symlink(oldname, newname string) error // Write write the data to path Write(path string) error // Remove remove the path Remove(path string) error // Rename rename the path Rename(path string) error // Chmod change the mode of path Chmod(path string) error // IsDir is a dir the path IsDir(path string) (bool, error) // SyncOnce sync the path to dest once SyncOnce(path string) error // Source the source file system Source() core.VFS // Dest the destination file system Dest() core.VFS // Close release the resource that is used by the sync component Close() }
Sync a file sync interface
func NewDiskSync ¶
NewDiskSync create a diskSync instance source is source path to read dest is dest path to write
func NewEmptySync ¶ added in v0.7.1
NewEmptySync create a emptySync instance
func NewMinIOPullClientSync ¶ added in v0.4.4
NewMinIOPullClientSync create an instance of the minIOPullClientSync
func NewMinIOPushClientSync ¶ added in v0.4.4
NewMinIOPushClientSync create an instance of the minIOPushClientSync
func NewPushClientSync ¶ added in v0.3.0
NewPushClientSync create an instance of the pushClientSync
func NewRemoteClientSync ¶
NewRemoteClientSync create an instance of remoteClientSync to receive the file change message and execute it
func NewRemoteServerSync ¶
NewRemoteServerSync create an instance of remoteServerSync execute send file change message
func NewRemoteSync ¶
NewRemoteSync auto create an instance of remoteServerSync or remoteClientSync according to source and dest
func NewSftpPullClientSync ¶ added in v0.4.4
NewSftpPullClientSync create an instance of the sftpPullClientSync
func NewSftpPushClientSync ¶ added in v0.4.4
NewSftpPushClientSync create an instance of the sftpPushClientSync