checkpoint

package
v1.11.0-beta.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualRemoteConfigSources

func EqualRemoteConfigSources(a, b RemoteConfigSource) bool

EqualRemoteConfigSources is a helper for comparing remote config sources by comparing the underlying API objects for semantic equality.

Types

type Payload added in v1.11.2

type Payload interface {
	// UID returns a globally unique (space and time) identifier for the payload.
	UID() string

	// Files returns a map of filenames to file contents.
	Files() map[string]string
	// contains filtered or unexported methods
}

Payload represents a local copy of a config source (payload) object

func NewConfigMapPayload added in v1.11.2

func NewConfigMapPayload(cm *apiv1.ConfigMap) (Payload, error)

NewConfigMapPayload constructs a Payload backed by a ConfigMap, which must have a non-empty UID

type RemoteConfigSource

type RemoteConfigSource interface {
	// UID returns a globally unique identifier of the source described by the remote config source object
	UID() string
	// KubeletFilename returns the name of the Kubelet config file as it should appear in the keys of Payload.Files()
	KubeletFilename() string
	// APIPath returns the API path to the remote resource, e.g. its SelfLink
	APIPath() string
	// Download downloads the remote config source object returns a Payload backed by the object,
	// or a sanitized failure reason and error if the download fails
	Download(client clientset.Interface) (Payload, string, error)
	// Encode returns a []byte representation of the NodeConfigSource behind the RemoteConfigSource
	Encode() ([]byte, error)

	// NodeConfigSource returns a copy of the underlying apiv1.NodeConfigSource object.
	// All RemoteConfigSources are expected to be backed by a NodeConfigSource,
	// though the convenience methods on the interface will target the source
	// type that was detected in a call to NewRemoteConfigSource.
	NodeConfigSource() *apiv1.NodeConfigSource
}

RemoteConfigSource represents a remote config source object that can be downloaded as a Checkpoint

func DecodeRemoteConfigSource

func DecodeRemoteConfigSource(data []byte) (RemoteConfigSource, error)

DecodeRemoteConfigSource is a helper for using the apimachinery to decode serialized RemoteConfigSources; e.g. the metadata stored by checkpoint/store/fsstore.go

func NewRemoteConfigSource

func NewRemoteConfigSource(source *apiv1.NodeConfigSource) (RemoteConfigSource, string, error)

NewRemoteConfigSource constructs a RemoteConfigSource from a v1/NodeConfigSource object You should only call this with a non-nil config source. Note that the API server validates Node.Spec.ConfigSource.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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