store

package
v1.11.0-alpha.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	// Initialize sets up the storage layer
	Initialize() error

	// Exists returns true if the object referenced by `source` has been checkpointed.
	Exists(source checkpoint.RemoteConfigSource) (bool, error)
	// Save Kubelet config payloads to the storage layer. It must be possible to unmarshal the payload to a KubeletConfiguration.
	// The following payload types are supported:
	// - k8s.io/api/core/v1.ConfigMap
	Save(c checkpoint.Payload) error
	// Load loads the KubeletConfiguration from the checkpoint referenced by `source`.
	Load(source checkpoint.RemoteConfigSource) (*kubeletconfig.KubeletConfiguration, error)

	// CurrentModified returns the last time that the current UID was set
	CurrentModified() (time.Time, error)
	// Current returns the source that points to the current checkpoint, or nil if no current checkpoint is set
	Current() (checkpoint.RemoteConfigSource, error)
	// LastKnownGood returns the source that points to the last-known-good checkpoint, or nil if no last-known-good checkpoint is set
	LastKnownGood() (checkpoint.RemoteConfigSource, error)

	// SetCurrent saves the source that points to the current checkpoint, set to nil to unset
	SetCurrent(source checkpoint.RemoteConfigSource) error
	// SetLastKnownGood saves the source that points to the last-known-good checkpoint, set to nil to unset
	SetLastKnownGood(source checkpoint.RemoteConfigSource) error
	// Reset unsets the current and last-known-good UIDs and returns whether the current UID was unset as a result of the reset
	Reset() (bool, error)
}

Store saves checkpoints and information about which is the current and last-known-good checkpoint to a storage layer

func NewFsStore

func NewFsStore(fs utilfs.Filesystem, dir string) Store

NewFsStore returns a Store that saves its data in dir

Jump to

Keyboard shortcuts

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