aws

package
v0.0.0-...-503c688 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2023 License: Apache-2.0, Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnPodNameKey        string = "tidb.pingcap.com/pod-name"
	AnnTemporaryVolumeID string = "temporary/volume-id"
	EC2K8SClusterNameKey string = "aws:eks:cluster-name"

	SourcePvcNameKey   string = "source/pvcName"
	SourceVolumeIdKey  string = "source/VolumeId"
	SourceTikvNameKey  string = "source/TikvName"
	SourceNamespaceKey string = "source/Namespace"
	SourceContextKey   string = "source/context"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EC2Session

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

func NewEC2Session

func NewEC2Session(concurrency uint, region string) (*EC2Session, error)

func (*EC2Session) CreateSnapshots

func (e *EC2Session) CreateSnapshots(backupInfo *config.EBSBasedBRMeta) (map[string]string, VolumeAZs, error)

CreateSnapshots is the mainly steps to control the data volume snapshots.

func (*EC2Session) CreateVolumes

func (e *EC2Session) CreateVolumes(meta *config.EBSBasedBRMeta, volumeType string, iops, throughput int64, targetAZ string) (map[string]string, error)

CreateVolumes create volumes from snapshots if err happens in the middle, return half-done result returned map: store id -> old volume id -> new volume id

func (*EC2Session) DeleteSnapshots

func (e *EC2Session) DeleteSnapshots(snapIDMap map[string]string)

func (*EC2Session) DeleteVolumes

func (e *EC2Session) DeleteVolumes(volumeIDMap map[string]string)

func (*EC2Session) HandleDescribeVolumesResponse

func (e *EC2Session) HandleDescribeVolumesResponse(resp *ec2.DescribeVolumesOutput) (int64, []*string)

func (*EC2Session) WaitSnapshotsCreated

func (e *EC2Session) WaitSnapshotsCreated(snapIDMap map[string]string, progress glue.Progress) (int64, error)

WaitSnapshotsCreated waits all snapshots finished. according to EBS snapshot will do real snapshot background. so we'll check whether all snapshots finished.

func (*EC2Session) WaitVolumesCreated

func (e *EC2Session) WaitVolumesCreated(volumeIDMap map[string]string, progress glue.Progress) (int64, error)

type SnapshotTags

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

type VolumeAZs

type VolumeAZs map[string]string

type VolumeSnapshotTags

type VolumeSnapshotTags map[string]SnapshotTags

func GenerateVolumeSnapshotTags

func GenerateVolumeSnapshotTags(backupInfo *config.EBSBasedBRMeta, pvVolumeMap map[string]string) (VolumeSnapshotTags, error)

Jump to

Keyboard shortcuts

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