s3plugin

package
v0.0.0-...-9073b6e Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DefaultConcurrency = 6
View Source
const DefaultDownloadChunkSize = int64(Mebibyte) * 500 // default 500MB
View Source
const DefaultUploadChunkSize = int64(Mebibyte) * 500 // default 500MB
View Source
const Mebibyte = 1024 * 1024

Variables

View Source
var Version string

Functions

func BackupData

func BackupData(c *cli.Context) error

func BackupDirectory

func BackupDirectory(c *cli.Context) error

func BackupDirectoryParallel

func BackupDirectoryParallel(c *cli.Context) error

func BackupFile

func BackupFile(c *cli.Context) error

func CleanupPlugin

func CleanupPlugin(c *cli.Context) error

func DeleteBackup

func DeleteBackup(c *cli.Context) error

func DeleteDirectory

func DeleteDirectory(c *cli.Context) error

func GetAPIVersion

func GetAPIVersion(c *cli.Context)

func GetS3Path

func GetS3Path(folder string, path string) string

func InitializeAndValidateConfig

func InitializeAndValidateConfig(config *PluginConfig) error

func IsValidTimestamp

func IsValidTimestamp(timestamp string) bool

func ListDirectory

func ListDirectory(c *cli.Context) error

func RestoreData

func RestoreData(c *cli.Context) error

func RestoreDirectory

func RestoreDirectory(c *cli.Context) error

func RestoreDirectoryParallel

func RestoreDirectoryParallel(c *cli.Context) error

func RestoreFile

func RestoreFile(c *cli.Context) error

func SetupPluginForBackup

func SetupPluginForBackup(c *cli.Context) error

func SetupPluginForRestore

func SetupPluginForRestore(c *cli.Context) error

func ShouldEnableEncryption

func ShouldEnableEncryption(encryption string) bool

Types

type CustomRetryer

type CustomRetryer struct {
	client.DefaultRetryer
}

CustomRetryer wraps the SDK's built in DefaultRetryer

func (CustomRetryer) ShouldRetry

func (r CustomRetryer) ShouldRetry(req *request.Request) bool

ShouldRetry overrides the SDK's built in DefaultRetryer

type PluginConfig

type PluginConfig struct {
	ExecutablePath string        `yaml:"executablepath"`
	Options        PluginOptions `yaml:"options"`
}

type PluginOptions

type PluginOptions struct {
	AwsAccessKeyId               string `yaml:"aws_access_key_id"`
	AwsSecretAccessKey           string `yaml:"aws_secret_access_key"`
	BackupMaxConcurrentRequests  string `yaml:"backup_max_concurrent_requests"`
	BackupMultipartChunksize     string `yaml:"backup_multipart_chunksize"`
	Bucket                       string `yaml:"bucket"`
	Encryption                   string `yaml:"encryption"`
	Endpoint                     string `yaml:"endpoint"`
	Folder                       string `yaml:"folder"`
	HttpProxy                    string `yaml:"http_proxy"`
	Region                       string `yaml:"region"`
	RemoveDuplicateBucket        string `yaml:"remove_duplicate_bucket"`
	RestoreMaxConcurrentRequests string `yaml:"restore_max_concurrent_requests"`
	RestoreMultipartChunksize    string `yaml:"restore_multipart_chunksize"`
	PgPort                       string `yaml:"pgport"`
	BackupPluginVersion          string `yaml:"backup_plugin_version"`

	UploadChunkSize     int64
	UploadConcurrency   int
	DownloadChunkSize   int64
	DownloadConcurrency int
}

type Scope

type Scope string
const (
	Master      Scope = "master"
	Coordinator Scope = "coordinator"
	SegmentHost Scope = "segment_host"
	Segment     Scope = "segment"
)

Jump to

Keyboard shortcuts

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