v0.6.1 Latest Latest

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

Go to latest
Published: Oct 23, 2017 License: Apache-2.0 Imports: 3 Imported by: 0




View Source
const (
	APIV1 = "/v1"
	// S3V1 indicates the version 1 of
	// S3 backup format: <s3Bucket>/<s3Prefix>/"v1"/<namespace>/<clusterName>
	S3V1 = "v1"
View Source
const (
	HTTPQueryVersionKey  = "etcdVersion"
	HTTPQueryRevisionKey = "etcdRevision"


This section is empty.


func BackupURLForCluster added in v0.6.1

func BackupURLForCluster(scheme, host, clusterName, version string, revision int64) *url.URL

BackupURLForCluster creates a URL struct for retrieving an existing backup of given cluster.

func NewBackupURL

func NewBackupURL(scheme, host, version string, revision int64) *url.URL

NewBackupURL creates a URL struct for retrieving an existing backup.

func ToS3Prefix added in v0.5.2

func ToS3Prefix(s3Prefix, namespace, clusterName string) string

ToS3Prefix concatenates s3Prefix, S3V1, namespace, clusterName to a single s3 prefix. the concatenated prefix determines the location of S3 backup files.


type BackupStatus

type BackupStatus struct {
	// Creation time of the backup.
	CreationTime string `json:"creationTime"`

	// Size is the size of the backup in MB.
	Size float64 `json:"size"`

	// Revision is the revision of the backup.
	Revision int64 `json:"revision"`

	// Version is the version of the backup cluster.
	Version string `json:"version"`

	// TimeTookInSecond is the total time took to create the backup.
	TimeTookInSecond int `json:"timeTookInSecond"`

type ServiceStatus

type ServiceStatus struct {
	// RecentBackup is status of the most recent backup created by
	// the backup service
	RecentBackup *BackupStatus `json:"recentBackup,omitempty"`

	// Backups is the totoal number of existing backups.
	Backups int `json:"backups"`

	// BackupSize is the total size of existing backups in MB.
	BackupSize float64 `json:"backupSize"`

Jump to

Keyboard shortcuts

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