delegation

package
v1.5.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockVolumeModifier

type MockVolumeModifier struct {
	ValidateFunc     ValidateFunc
	ModifyVolumeFunc ModifyVolumeFunc
	// contains filtered or unexported fields
}

func NewMockVolumeModifier

func NewMockVolumeModifier(name string, minWaitDuration time.Duration) *MockVolumeModifier

func (*MockVolumeModifier) MinWaitDuration

func (m *MockVolumeModifier) MinWaitDuration() time.Duration

func (*MockVolumeModifier) ModifyVolume

func (*MockVolumeModifier) Name

func (m *MockVolumeModifier) Name() string

func (*MockVolumeModifier) Validate

func (m *MockVolumeModifier) Validate(spvc, dpvc *corev1.PersistentVolumeClaim, ssc, dsc *storagev1.StorageClass) error

type ValidateFunc

type ValidateFunc func(spvc, dpvc *corev1.PersistentVolumeClaim, ssc, dsc *storagev1.StorageClass) error

type VolumeModifier

type VolumeModifier interface {
	MinWaitDuration() time.Duration
	// ModifyVolume 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`.
	ModifyVolume(ctx context.Context, pvc *corev1.PersistentVolumeClaim, pv *corev1.PersistentVolume, sc *storagev1.StorageClass) (bool, error)

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

	Name() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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