Documentation ¶
Index ¶
- func CompareChecksum(filename string, checksumRemote string, site *Site) string
- func FilePathWalkDir(site *Site, awsItems map[string]string, uploadCh chan<- UploadCFG, ...)
- func IsExcluded(path string, exclusions []string, inclusions []string) bool
- func LoggerInitError(err error)
- func Start()
- type ChecksumCFG
- type Config
- type InfoResponse
- type ReloadHandler
- type ReloadResponse
- type Site
- type UploadCFG
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompareChecksum ¶
CompareChecksum compares local file checksum with S3 ETag value
func FilePathWalkDir ¶
func FilePathWalkDir(site *Site, awsItems map[string]string, uploadCh chan<- UploadCFG, checksumCh chan<- ChecksumCFG)
FilePathWalkDir walks through the directory and all subdirectories returning list of files for upload and list of files to be deleted from S3
func IsExcluded ¶
IsExcluded check if a path is excluded
func LoggerInitError ¶
func LoggerInitError(err error)
LoggerInitError is a custom error representation
Types ¶
type ChecksumCFG ¶
type ChecksumCFG struct { UploadCFG UploadCFG // contains filtered or unexported fields }
ChecksumCFG - structure for the checksum comparison queue
type Config ¶
type Config struct { AccessKey string `yaml:"access_key"` SecretAccessKey string `yaml:"secret_access_key"` AwsRegion string `yaml:"aws_region"` LogLevel string `yaml:"loglevel"` UploadQueueBuffer int `yaml:"upload_queue_buffer"` UploadWorkers int `yaml:"upload_workers"` ChecksumWorkers int `yaml:"checksum_workers"` WatchInterval time.Duration `yaml:"watch_interval"` S3OpsRetries int `yaml:"s3_ops_retries"` Sites []Site `yaml:",flow"` }
Config structure - contains lst of Site options
type InfoResponse ¶
type InfoResponse struct { VERSION string STARTUPTIME time.Time STATUS string SITES int UPLOADWORKERS int CHECKSUMWORKERS int LOGLEVEL string }
InfoResponse defines info response data
type ReloadHandler ¶
type ReloadHandler struct {
Chan chan<- bool
}
ReloadHandler defines reload handler
type ReloadResponse ¶
ReloadResponse defines info response data
type Site ¶
type Site struct { Name string `yaml:"name"` LocalPath string `yaml:"local_path"` Bucket string `yaml:"bucket"` Endpoint string `yaml:"endpoint"` BucketPath string `yaml:"bucket_path"` BucketRegion string `yaml:"bucket_region"` StorageClass string `yaml:"storage_class"` AccessKey string `yaml:"access_key"` SecretAccessKey string `yaml:"secret_access_key"` RetireDeleted bool `yaml:"retire_deleted"` Exclusions []string `yaml:",flow"` Inclusions []string `yaml:",flow"` WatchInterval time.Duration `yaml:"watch_interval"` S3OpsRetries int `yaml:"s3_ops_retries"` // contains filtered or unexported fields }
Site is a set of options for backing up data to S3
Source Files ¶
Click to show internal directories.
Click to hide internal directories.