Documentation ¶
Index ¶
- type MockVolumeModifier
- func (m *MockVolumeModifier) MinWaitDuration() time.Duration
- func (m *MockVolumeModifier) ModifyVolume(ctx context.Context, pvc *corev1.PersistentVolumeClaim, ...) (bool, error)
- func (m *MockVolumeModifier) Name() string
- func (m *MockVolumeModifier) Validate(spvc, dpvc *corev1.PersistentVolumeClaim, ssc, dsc *storagev1.StorageClass) error
- type ModifyVolumeFunc
- type ValidateFunc
- type VolumeModifier
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 (m *MockVolumeModifier) ModifyVolume(ctx context.Context, pvc *corev1.PersistentVolumeClaim, pv *corev1.PersistentVolume, sc *storagev1.StorageClass) (bool, error)
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 ModifyVolumeFunc ¶
type ModifyVolumeFunc func(ctx context.Context, pvc *corev1.PersistentVolumeClaim, pv *corev1.PersistentVolume, sc *storagev1.StorageClass) (bool, 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 }
Click to show internal directories.
Click to hide internal directories.