rclone

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const MB = 1000000

Variables

This section is empty.

Functions

This section is empty.

Types

type CompareRes

type CompareRes struct {
	SrcStor  string
	DestStor string
	Bucket   string
	IsMatch  bool

	MissFrom []string
	MissTo   []string
	Differ   []string
	Error    []string
	Match    []string
}

type Config

type Config struct {
	MemoryLimit     MemoryLimit               `yaml:"memoryLimit"`
	MemoryCalc      MemoryCalc                `yaml:"memoryCalc"`
	LocalFileLimit  ratelimit.SemaphoreConfig `yaml:"localFileLimit"`
	GlobalFileLimit ratelimit.SemaphoreConfig `yaml:"globalFileLimit"`
}

type File

type File struct {
	Storage string
	Bucket  string
	Name    string
}

type MemCalculator

type MemCalculator struct {
	// contains filtered or unexported fields
}

func NewMemoryCalculator

func NewMemoryCalculator(conf MemoryCalc) *MemCalculator

type MemoryCalc

type MemoryCalc struct {
	Const string  `yaml:"const"`
	Mul   float64 `yaml:"mul"`
}

type MemoryLimit

type MemoryLimit struct {
	Enabled  bool          `yaml:"enabled"`
	Limit    string        `yaml:"limit"`
	RetryMin time.Duration `yaml:"retryMin"`
	RetryMax time.Duration `yaml:"retryMax"`
}

type Service

type Service interface {
	CopyTo(ctx context.Context, from, to File, size int64) error

	Compare(ctx context.Context, listMatch bool, from, to, bucket string) (*CompareRes, error)
}

func New

func New(conf *s3.StorageConfig, jsonLog bool, metricsSvc metrics.S3Service, mamCalc *MemCalculator, memLimiter, fileLimiter ratelimit.Semaphore) (Service, error)

Jump to

Keyboard shortcuts

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