cache

package
v0.0.0-...-ef9bc7b Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2017 License: Apache-2.0 Imports: 5 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 GetNameAndNameSpaceFromSnapshotName

func GetNameAndNameSpaceFromSnapshotName(name string) (string, string, error)

func MakeSnapshotName

func MakeSnapshotName(namespace, name string) string

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
}

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
}

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