types

package
v0.3.5-alpha Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2017 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package types defines types and constants used in the ReShifter lib.

Index

Constants

View Source
const (
	// DefaultWorkDir is the default work directory for backups
	DefaultWorkDir = "/tmp/reshifter"
	// EscapeColon represents the ':' character in an etcd key
	EscapeColon = "ESC_COLON"
	// ContentFile is the name of the file an etcd value is stored
	ContentFile = "content"
	// KubernetesPrefix represents the etcd key prefix for core Kubernetes
	KubernetesPrefix = "/kubernetes.io"
	// KubernetesPrefixLast represents a stop marker for core Kubernetes
	KubernetesPrefixLast = "/kubernetes.io/zzzzzzzzzz"
	// OpenShiftPrefix represents the etcd key prefix for OpenShift
	OpenShiftPrefix = "/openshift.io"
	// OpenShiftPrefixLast represents a stop marker for OpenShift
	OpenShiftPrefixLast = "/openshift.io/zzzzzzzzzz"
	// ContentTypeZip represents the content type for a ZIP file
	ContentTypeZip = "application/zip"
	// NotADistro represents the fact that no Kubernetes distro-related prefixes exit in etcd
	NotADistro KubernetesDistro = iota
	// Vanilla represents the vanilla, upstream Kubernetes distribution.
	Vanilla
	// OpenShift represents an OpenShift Kubernetes distribution.
	OpenShift
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BackupRequest

type BackupRequest struct {
	Endpoint string `json:"endpoint"`
	Remote   string `json:"remote"`
	Bucket   string `json:"bucket"`
}

BackupRequest represents the request for a backup operation.

type BackupResult

type BackupResult struct {
	Outcome  string `json:"outcome"`
	BackupID string `json:"backupid"`
}

BackupResult represents the results of a backup operation.

type EtcdResponse

type EtcdResponse struct {
	EtcdServerVersion  string `json:"etcdserver"`
	EtcdClusterVersion string `json:"etcdcluster"`
}

EtcdResponse represents the response of an etcd2 server at /version endpoint. Example:

{
	"etcdserver": "2.3.8",
	"etcdcluster": "2.3.0"
}

type KubernetesDistro

type KubernetesDistro int

KubernetesDistro represents a Kubernetes distribution.

type Reap

type Reap func(string, string) error

Reap function types take a node path and a value as parameters and performs some side effect, such as storing, on the node

type RestoreRequest

type RestoreRequest struct {
	Endpoint string `json:"endpoint"`
	BackupID string `json:"backupid"`
	Remote   string `json:"remote"`
	Bucket   string `json:"bucket"`
}

RestoreRequest represents the request for a restore operation.

type RestoreResult

type RestoreResult struct {
	Outcome      string `json:"outcome"`
	KeysRestored int    `json:"keysrestored"`
}

RestoreResult represents the results of a restore operation.

Jump to

Keyboard shortcuts

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