utils

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteAuroraSnapshots

func DeleteAuroraSnapshots(name string) error

func ExtractInstanceRDSInfo

func ExtractInstanceRDSInfo(name, cluster, clusterType string) (*[]RDSInstanceInfo, error)

func FormatDuration

func FormatDuration(d time.Duration) string

func GetAWSCrential

func GetAWSCrential() (*aws.Credentials, error)

func GetDefaultRegion

func GetDefaultRegion() (*string, error)

func GetS3BucketLocation

func GetS3BucketLocation(bucketName string) (string, error)

func GetSnapshot

func GetSnapshot(name string) (*string, error)

func GetValidBackupS3

func GetValidBackupS3(snapshotName string) (*[]types.ExportTask, error)

func RDSSnapshotTaken

func RDSSnapshotTaken(name, file string, position float64) (*string, error)

func WaitResourceUntilExpectState

func WaitResourceUntilExpectState(_interval, _timeout time.Duration, _resourceStateCheck func() (bool, error)) error

Types

type ExecutionTimer

type ExecutionTimer struct {
	MessageTable [][]string
	StartTimer   time.Time
	LastTimer    time.Time
}

func NewTimer

func NewTimer() *ExecutionTimer

func (*ExecutionTimer) Append

func (c *ExecutionTimer) Append(copyTimer *ExecutionTimer) error

func (*ExecutionTimer) Initialize

func (c *ExecutionTimer) Initialize(header []string) error

func (*ExecutionTimer) Print

func (c *ExecutionTimer) Print() error

func (*ExecutionTimer) Take

func (c *ExecutionTimer) Take(phase string) error

Timer handle

type RDSInstanceInfo

type RDSInstanceInfo struct {
	PhysicalResourceId string
	EndPointAddress    string
	DBName             string
	DBPort             int64
	DBUserName         string
	DBSize             int64
	DBEngine           string
	DBEngineVersion    string
	DBInstanceClass    string
	VpcSecurityGroupId string
}

type TiDBClusterNodes

type TiDBClusterNodes struct {
	PD      []string
	TiDB    []string
	TiKV    []string
	TiCDC   []string
	DM      []string
	Monitor []string
	Pump    []string
	Drainer []string
}

func ExtractTiDBClusterNodes

func ExtractTiDBClusterNodes(name, cluster, clusterType string) (*TiDBClusterNodes, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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