Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DownloadFile ¶ added in v8.13.5
DownloadFile downloads the auto-restore file from the given URL, and returns the path to the downloaded file. If the download fails, and the config is marked as continue-on-failure, then the error is returned, but errOK is set to true. If the download fails, and the file is not marked as continue-on-failure, then the error is returned, and errOK is set to false.
func ReadConfigFile ¶
ReadConfigFile reads the config file and returns the data. It also expands any environment variables in the config file.
func ResetStats ¶
func ResetStats()
ResetStats resets the expvar stats for this module. Mostly for test purposes.
Types ¶
type Config ¶
type Config struct { Version int `json:"version"` Type auto.StorageType `json:"type"` Timeout auto.Duration `json:"timeout,omitempty"` ContinueOnFailure bool `json:"continue_on_failure,omitempty"` Sub json.RawMessage `json:"sub"` }
Config is the config file format for the upload service
type Downloader ¶
type Downloader struct {
// contains filtered or unexported fields
}
func NewDownloader ¶
func NewDownloader(storageClient StorageClient) *Downloader
Click to show internal directories.
Click to hide internal directories.