cloud

package
v2.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTestPV

func NewTestPV(volID string) *corev1.PersistentVolume

func NewTestPVC

func NewTestPVC(size string) *corev1.PersistentVolumeClaim

Types

type FakeVolumeModifier

type FakeVolumeModifier struct {
	// contains filtered or unexported fields
}

FakeVolumeModifier is a fake implementation of the VolumeModifier interface for unit testing.

func (*FakeVolumeModifier) MinWaitDuration

func (f *FakeVolumeModifier) MinWaitDuration() time.Duration

func (*FakeVolumeModifier) Name

func (f *FakeVolumeModifier) Name() string

func (*FakeVolumeModifier) Validate

type VolumeModifier

type VolumeModifier interface {
	// Name returns the name of the volume modifier.
	Name() string

	// Modify modifies the underlay volume of pvc to match the args of storageclass.
	// If no PV permission (e.g `-cluster-permission-pv=false`), the `pv` may be nil and will return `false, nil`.
	Modify(ctx context.Context, pvc *corev1.PersistentVolumeClaim, pv *corev1.PersistentVolume, sc *storagev1.StorageClass) (bool, error)

	MinWaitDuration() time.Duration

	Validate(spvc, dpvc *corev1.PersistentVolumeClaim, ssc, dsc *storagev1.StorageClass) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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