cache

package
v5.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package cache implements data structures used by the snapshot controller to keep track of volume snapshots.

Package cache implements data structures used by the snapshot controller to keep track of volume snapshots.

Package cache implements data structures used by the attach/detach controller to keep track of volumes, the nodes they are attached to, and the pods that reference them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeSnapshotName

func MakeSnapshotName(snapshot *crdv1.VolumeSnapshot) string

MakeSnapshotName makes a full name for a snapshot that includes the namespace and the short name

Types

type ActualStateOfWorld

type ActualStateOfWorld interface {
	// Adds snapshot to the list of snapshots. No-op if the snapshot
	// is already in the list.
	AddSnapshot(*crdv1.VolumeSnapshot) error

	// Deletes the snapshot from the list of known snapshots. No-op if the snapshot
	// does not exist.
	DeleteSnapshot(snapshotName string) error

	// Return a copy of the known snapshots
	GetSnapshots() map[string]*crdv1.VolumeSnapshot

	// Get snapshot by its name
	GetSnapshot(snapshotName string) *crdv1.VolumeSnapshot

	// Check whether the specified snapshot exists
	SnapshotExists(snapshotName string) bool
}

ActualStateOfWorld defines a set of thread-safe operations supported on the snapshot controller's actual state of the world cache. This cache contains snapshots the snapshot controller believes are successfully created.

func NewActualStateOfWorld

func NewActualStateOfWorld() ActualStateOfWorld

NewActualStateOfWorld returns a new instance of ActualStateOfWorld.

type DesiredStateOfWorld

type DesiredStateOfWorld interface {
	// Adds snapshot to the list of snapshots. No-op if the snapshot
	// is already in the list.
	AddSnapshot(*crdv1.VolumeSnapshot) error

	// Deletes the snapshot from the list of known snapshots. No-op if the snapshot
	// does not exist.
	DeleteSnapshot(snapshotName string) error

	// Return a copy of the known snapshots
	GetSnapshots() map[string]*crdv1.VolumeSnapshot

	// Check whether the specified snapshot exists
	SnapshotExists(snapshotName string) bool
}

DesiredStateOfWorld defines a set of thread-safe operations supported on the snapshot controller's desired state of the world cache. This cache contains all the snapshots that should be created by the snapshot controller.

func NewDesiredStateOfWorld

func NewDesiredStateOfWorld() DesiredStateOfWorld

NewDesiredStateOfWorld returns a new instance of DesiredStateOfWorld.

Jump to

Keyboard shortcuts

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