package
1.7.0-alpha.3
Repository: https://github.com/pingcap/tidb-operator.git
Documentation: pkg.go.dev

# Functions

CalcVolSnapBackupSize get snapshots from backup meta and then calc the backup size of snapshots.
ConstructBRGlobalOptionsForBackup constructs BR global options for backup and also return the remote path.
ConstructBRGlobalOptionsForRestore constructs BR global options for restore.
ConstructDumplingOptionsForBackup constructs dumpling options for backup.
ConstructRcloneArgs constructs the rclone args.
EnsureDirectoryExist create directory if does not exist.
GetBRArchiveSize returns the total size of the backup archive.
GetBRMetaData get backup metadata from cloud storage.
GetCommitTsFromBRMetaData get backup position from `EndVersion` in BR backup meta.
GetCommitTsFromMetadata get commitTs from mydumper's metadata file metadata file format is as follows: Started dump at: 2019-06-13 10:00:04 SHOW MASTER STATUS: Log: tidb-binlog Pos: 409054741514944513 GTID: Finished dump at: 2019-06-13 10:00:04 */.
GetContextForTerminationSignals get a context for some termination signals, and the context will become done after any of these signals triggered.
GetOptions gets the rclone options.
GetOptionValueFromEnv get option's value from environment variable.
GetSliceExcludeString get a slice of strings that excludes the specified substring.
GetStoragePath generate the path of a specific storage.
GracefullyShutDownSubProcess just send SIGTERM to the process of cmd when context done the caller should wait the process of cmd to shut down.
IsDirExist return true if path exist and is a dir, other cases return false.
No description provided by the author
No description provided by the author
IsFileExist return true if file exist and is a regular file, other cases return false.
NewCRCli create a CR cli Interface.
NewEventRecorder return the specify source's recoder.
NewKubeAndCRCli create both kube cli and CR cli.
NewKubeCli create a kubeCli Interface.
NormalizeBucketURI normal bucket URL for rclone, e.g.
ParseRestoreProgress parse restore progress and return restore step and progress.
ReadAllStdErrToChannel read the stdErr and send the output to channel.
No description provided by the author
RetryOnError allows the caller to retry fn in case the error returned by fn.
Suffix parses the major and minor version from the string and return the suffix.
ValidCmdFlags verify that all flags are set.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
DescribeSnapMaxReturnResult can be between 5 and 1,000; if MaxResults is given a value larger than 1,000, only 1,000 results are returned.
EbsApiConcurrency can be between 1 and 50 due to aws service quota.
ListSnapMaxReturnResult can be between 100 and 10,000, and charge ~0.6$/1 million request.

# Variables

DefaultVersion is the default tikv and br version.

# Structs

GenericOptions contains the generic input arguments to the backup/restore command.