common

package
v0.0.0-...-48e9188 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: GPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SnapshotWorkerCount = 128
	SnapshotBatchSize   = 100000
	RestoreWorkerCount  = 1024
	MaxRetries          = 10
	GcBatchSize         = 1
)

Variables

This section is empty.

Functions

func ConfigureAws

func ConfigureAws(region string)

func Min

func Min(x int, y int) int

Types

type AppConfig

type AppConfig struct {
	LogLevel    int
	AwsLogLevel aws.LogLevelType
	Syslog      bool
	BackupSet   BackupSet
}
var (
	Cfg AppConfig
)

type BackupSet

type BackupSet struct {
	SnapshotsDir      string
	CompressSnapshots bool
	MinimumRedundancy int
	RetentionPolicy   int
	MasterBucket      string
	MasterRegion      string
	SlaveBucket       string
	SlaveRegion       string
	AccessKey         string
	SecretKey         string
}

type Snapshot

type Snapshot struct {
	File      string
	Timestamp time.Time `json:"Timestamp"`
	Contents  []Version `json:"Contents"`
}

func LoadSnapshot

func LoadSnapshot(file string) (snapshot Snapshot)

func LoadSnapshots

func LoadSnapshots() (snapshots []Snapshot)

type Version

type Version struct {
	Key          string
	LastModified time.Time
	Size         int64
	VersionId    string
}

Jump to

Keyboard shortcuts

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