Documentation ¶
Index ¶
- func NewEBSModifier(cfg aws.Config) delegation.VolumeModifier
- func NewFakeEBSModifier(f GetVolumeStateFunc) delegation.VolumeModifier
- type EBSModifier
- func (m *EBSModifier) MinWaitDuration() time.Duration
- func (m *EBSModifier) ModifyVolume(ctx context.Context, pvc *corev1.PersistentVolumeClaim, ...) (bool, error)
- func (m *EBSModifier) Name() string
- func (m *EBSModifier) Validate(spvc, dpvc *corev1.PersistentVolumeClaim, ssc, dsc *storagev1.StorageClass) error
- type EC2VolumeAPI
- type FakeEC2VolumeAPI
- func (m *FakeEC2VolumeAPI) DescribeVolumesModifications(ctx context.Context, param *ec2.DescribeVolumesModificationsInput, ...) (*ec2.DescribeVolumesModificationsOutput, error)
- func (m *FakeEC2VolumeAPI) ModifyVolume(ctx context.Context, param *ec2.ModifyVolumeInput, ...) (*ec2.ModifyVolumeOutput, error)
- type GetVolumeStateFunc
- type Volume
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEBSModifier ¶
func NewEBSModifier(cfg aws.Config) delegation.VolumeModifier
func NewFakeEBSModifier ¶
func NewFakeEBSModifier(f GetVolumeStateFunc) delegation.VolumeModifier
Types ¶
type EBSModifier ¶
type EBSModifier struct {
// contains filtered or unexported fields
}
func (*EBSModifier) MinWaitDuration ¶
func (m *EBSModifier) MinWaitDuration() time.Duration
func (*EBSModifier) ModifyVolume ¶
func (m *EBSModifier) ModifyVolume(ctx context.Context, pvc *corev1.PersistentVolumeClaim, pv *corev1.PersistentVolume, sc *storagev1.StorageClass) (bool, error)
func (*EBSModifier) Name ¶
func (m *EBSModifier) Name() string
func (*EBSModifier) Validate ¶
func (m *EBSModifier) Validate(spvc, dpvc *corev1.PersistentVolumeClaim, ssc, dsc *storagev1.StorageClass) error
TODO: add more validation to avoid call aws api too frequent
type EC2VolumeAPI ¶
type EC2VolumeAPI interface { ModifyVolume(ctx context.Context, param *ec2.ModifyVolumeInput, optFns ...func(*ec2.Options)) (*ec2.ModifyVolumeOutput, error) DescribeVolumesModifications(ctx context.Context, param *ec2.DescribeVolumesModificationsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVolumesModificationsOutput, error) }
type FakeEC2VolumeAPI ¶
type FakeEC2VolumeAPI struct {
// contains filtered or unexported fields
}
func NewFakeEC2VolumeAPI ¶
func NewFakeEC2VolumeAPI(f GetVolumeStateFunc) *FakeEC2VolumeAPI
func (*FakeEC2VolumeAPI) DescribeVolumesModifications ¶
func (m *FakeEC2VolumeAPI) DescribeVolumesModifications(ctx context.Context, param *ec2.DescribeVolumesModificationsInput, optFns ...func(*ec2.Options)) (*ec2.DescribeVolumesModificationsOutput, error)
func (*FakeEC2VolumeAPI) ModifyVolume ¶
func (m *FakeEC2VolumeAPI) ModifyVolume(ctx context.Context, param *ec2.ModifyVolumeInput, optFns ...func(*ec2.Options)) (*ec2.ModifyVolumeOutput, error)
type GetVolumeStateFunc ¶
type GetVolumeStateFunc func(id string) types.VolumeModificationState
Click to show internal directories.
Click to hide internal directories.