kubernetes: k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store Index | Files

package store

import "k8s.io/kubernetes/pkg/kubelet/kubeletconfig/checkpoint/store"


Package Files

fakestore.go fsstore.go store.go

type Store Uses

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

    // Exists returns true if the object referenced by `source` has been checkpointed.
    // The source must be unambiguous - e.g. if referencing an API object it must specify both uid and resourceVersion.
    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)

    // AssignedModified returns the last time that the assigned checkpoint was set
    AssignedModified() (time.Time, error)
    // Assigned returns the source that points to the checkpoint currently assigned to the Kubelet, or nil if no assigned checkpoint is set
    Assigned() (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)

    // SetAssigned saves the source that points to the assigned checkpoint, set to nil to unset
    SetAssigned(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 assigned and last-known-good checkpoints and returns whether the assigned checkpoint was unset as a result of the reset
    Reset() (bool, error)

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

func NewFakeStore Uses

func NewFakeStore() Store

NewFakeStore constructs a fake Store

func NewFsStore Uses

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

NewFsStore returns a Store that saves its data in dir

Package store imports 9 packages (graph) and is imported by 1 packages. Updated 2019-01-23. Refresh now. Tools for package owners.