Documentation ¶
Index ¶
- func IsFiltered(vol *ec2.Volume, filterFuncs []func(t *ec2.Tag) bool) bool
- func IsInvalidConfig(err error) bool
- func IsVolumeNotFound(err error) bool
- func NewDockerVolumeFilter(cr v1alpha1.Cluster) func(t *ec2.Tag) bool
- func NewEtcdVolumeFilter(cr v1alpha1.Cluster) func(t *ec2.Tag) bool
- func NewPersistentVolumeFilter(cr v1alpha1.Cluster) func(t *ec2.Tag) bool
- type Config
- type EBS
- type EC2Client
- type Interface
- type Volume
- type VolumeAttachment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsInvalidConfig ¶
IsInvalidConfig asserts invalidConfigError.
func IsVolumeNotFound ¶
IsVolumeNotFound asserts volume not found error from upstream's API code.
Types ¶
type Config ¶
type Config struct { Client EC2Client Logger micrologger.Logger }
type EBS ¶
type EBS struct {
// contains filtered or unexported fields
}
func (*EBS) DeleteVolume ¶
DeleteVolume deletes an EBS volume with retry logic.
func (*EBS) DetachVolume ¶
func (e *EBS) DetachVolume(ctx context.Context, volumeID string, attachment VolumeAttachment, force bool, shutdown bool, wait bool) error
DetachVolume detaches an EBS volume. If force is specified data loss may occur. If shutdown is specified the instance will be stopped first.
func (*EBS) ListVolumes ¶
func (e *EBS) ListVolumes(cr v1alpha1.Cluster, filterFuncs ...func(t *ec2.Tag) bool) ([]Volume, error)
ListVolumes lists EBS volumes for a guest cluster. If etcdVolume is true the Etcd volume for the master instance will be returned. If persistentVolume is set then any Persistent Volumes associated with the cluster will be returned.
type EC2Client ¶
type EC2Client interface { DeleteVolume(*ec2.DeleteVolumeInput) (*ec2.DeleteVolumeOutput, error) DescribeVolumes(*ec2.DescribeVolumesInput) (*ec2.DescribeVolumesOutput, error) DetachVolume(*ec2.DetachVolumeInput) (*ec2.VolumeAttachment, error) StopInstances(*ec2.StopInstancesInput) (*ec2.StopInstancesOutput, error) WaitUntilInstanceStopped(*ec2.DescribeInstancesInput) error }
EC2Client describes the methods required to be implemented by an EC2 AWS client.
type Interface ¶
type Interface interface { // DeleteVolume deletes an EBS volume with retry logic. DeleteVolume(ctx context.Context, volumeID string) error // DetachVolume detaches an EBS volume. If force is specified data loss may // occur. If shutdown is specified the instance will be stopped first. DetachVolume(ctx context.Context, volumeID string, attachment VolumeAttachment, force bool, shutdown bool, wait bool) error // ListVolumes lists EBS volumes for a guest cluster. If etcdVolume is true // the Etcd volume for the master instance will be returned. If // persistentVolume is true then any Persistent Volumes associated with the // cluster will be returned. ListVolumes(customObject v1alpha1.Cluster, filterFuncs ...func(t *ec2.Tag) bool) ([]Volume, error) }
Interface describes the methods provided by the helm client.
type Volume ¶
type Volume struct { VolumeID string Attachments []VolumeAttachment }
Volume is an EBS volume and its attachments.
type VolumeAttachment ¶
VolumeAttachment is an EBS volume attached to an EC2 instance.