strategy

package
v0.0.0-...-c5dc7fc Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PolicyLabelKey = snapshotpolicy.GroupName + "/inuse"
	ClaimLabelKey  = snapshotpolicy.GroupName + "/claim"
	ForceKey       = "snapshot.alpha.kubernetes.io/force"
)
View Source
const (
	//EventRun - Name of the event for the strategy run result
	EventRun = "StrategyRun"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SnapshotClient

type SnapshotClient struct {
	ExternalStorageSnapshot *rest.RESTClient
	CsiSnapshot             csisnapshotv1alpha1.VolumesnapshotV1alpha1Interface
	UseCSI                  bool
}

type Strategy

type Strategy interface {
	// TODO: Add context for cancellation
	Run(v1alpha1.SnapshotPolicy) (*v1alpha1.SnapshotPolicyStatus, error)
}

Strategy - Defines a process for creating a snapshot.

func CreateStrategy

func CreateStrategy(snapshotClient SnapshotClient, pvcLister corelisters.PersistentVolumeClaimLister, name StrategyName) (Strategy, error)

type StrategyName

type StrategyName string
const (
	InUse StrategyName = "inuse"
)

Jump to

Keyboard shortcuts

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