sync

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 21 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListAll

func ListAll(store object.ObjectStorage, start, end string) (<-chan object.Object, error)

ListAll on all the keys that starts at marker from object storage.

func Sync

func Sync(src, dst object.ObjectStorage, config *Config) error

Sync syncs all the keys between to object storage

Types

type Config

type Config struct {
	Start       string
	End         string
	Threads     int
	HTTPPort    int
	Update      bool
	ForceUpdate bool
	Perms       bool
	Dry         bool
	DeleteSrc   bool
	DeleteDst   bool
	Dirs        bool
	Exclude     []string
	Include     []string
	Links       bool
	Limit       int64
	Manager     string
	Workers     []string
	BWLimit     int
	NoHTTPS     bool
	Verbose     bool
	Quiet       bool
	CheckAll    bool
	CheckNew    bool
}

func NewConfigFromCli

func NewConfigFromCli(c *cli.Context) *Config

type Stat

type Stat struct {
	Copied       int64 // the number of copied files
	CopiedBytes  int64 // total amount of copied data in bytes
	CheckedBytes int64 // total amount of checked data in bytes
	Deleted      int64 // the number of deleted files
	Skipped      int64 // the number of files skipped
	Failed       int64 // the number of files that fail to copy
}

Stat has the counters to represent the progress.

Jump to

Keyboard shortcuts

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