Documentation ¶
Index ¶
- Constants
- Variables
- func CheckRestoreDBAndTable(client *restore.Client, cfg *RestoreConfig) error
- func DefineBackupEBSFlags(flags *pflag.FlagSet)
- func DefineBackupFlags(flags *pflag.FlagSet)
- func DefineCommonFlags(flags *pflag.FlagSet)
- func DefineDatabaseFlags(command *cobra.Command)
- func DefineFilterFlags(command *cobra.Command, defaultFilter []string, setHidden bool)
- func DefineRawBackupFlags(command *cobra.Command)
- func DefineRawRestoreFlags(command *cobra.Command)
- func DefineRestoreCommonFlags(flags *pflag.FlagSet)
- func DefineRestoreFlags(flags *pflag.FlagSet)
- func DefineRestoreSnapshotFlags(command *cobra.Command)
- func DefineStreamCommonFlags(flags *pflag.FlagSet)
- func DefineStreamPauseFlags(flags *pflag.FlagSet)
- func DefineStreamRestoreFlags(command *cobra.Command)
- func DefineStreamStartFlags(flags *pflag.FlagSet)
- func DefineStreamStatusCommonFlags(flags *pflag.FlagSet)
- func DefineStreamTruncateLogFlags(flags *pflag.FlagSet)
- func DefineTableFlags(command *cobra.Command)
- func GetKeepalive(cfg *Config) keepalive.ClientParameters
- func GetStorage(ctx context.Context, storageName string, cfg *Config) (*backuppb.StorageBackend, storage.ExternalStorage, error)
- func HiddenFlagsForStream(flags *pflag.FlagSet)
- func IsStreamRestore(cmdName string) bool
- func LogArguments(cmd *cobra.Command)
- func NewMgr(ctx context.Context, g glue.Glue, pds []string, tlsConfig TLSConfig, ...) (*conn.Mgr, error)
- func NewStreamMgr(ctx context.Context, cfg *StreamConfig, g glue.Glue, isStreamStart bool) (*streamMgr, error)
- func ParseTLSTripleFromFlags(flags *pflag.FlagSet) (ca, cert, key string, err error)
- func ParseTSString(ts string, tzCheck bool) (uint64, error)
- func ReadBackupMeta(ctx context.Context, fileName string, cfg *Config) (*backuppb.StorageBackend, storage.ExternalStorage, *backuppb.BackupMeta, error)
- func ReadBackupMetaData(ctx context.Context, s storage.ExternalStorage) (uint64, int, error)
- func RunBackup(c context.Context, g glue.Glue, cmdName string, cfg *BackupConfig) error
- func RunBackupEBS(c context.Context, g glue.Glue, cfg *BackupConfig) error
- func RunBackupRaw(c context.Context, g glue.Glue, cmdName string, cfg *RawKvConfig) error
- func RunResolveKvData(c context.Context, g glue.Glue, cmdName string, cfg *RestoreConfig) error
- func RunRestore(c context.Context, g glue.Glue, cmdName string, cfg *RestoreConfig) error
- func RunRestoreEBSMeta(c context.Context, g glue.Glue, cmdName string, cfg *RestoreConfig) error
- func RunRestoreRaw(c context.Context, g glue.Glue, cmdName string, cfg *RestoreRawConfig) (err error)
- func RunStreamAdvancer(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamCommand(ctx context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamMetadata(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamPause(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamRestore(c context.Context, g glue.Glue, cmdName string, cfg *RestoreConfig) (err error)
- func RunStreamResume(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamStart(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamStatus(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamStop(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func RunStreamTruncate(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error
- func ShiftTS(startTS uint64) uint64
- type BackupConfig
- type CompressionConfig
- type Config
- type FullBackupType
- type RawKvConfig
- type RestoreCommonConfig
- type RestoreConfig
- type RestoreFunc
- type RestoreRawConfig
- type StreamConfig
- func (cfg *StreamConfig) ParseStreamCommonFromFlags(flags *pflag.FlagSet) error
- func (cfg *StreamConfig) ParseStreamPauseFromFlags(flags *pflag.FlagSet) error
- func (cfg *StreamConfig) ParseStreamStartFromFlags(flags *pflag.FlagSet) error
- func (cfg *StreamConfig) ParseStreamStatusFromFlags(flags *pflag.FlagSet) error
- func (cfg *StreamConfig) ParseStreamTruncateFromFlags(flags *pflag.FlagSet) error
- type TLSConfig
Constants ¶
const ( FullBackupCmd = "Full Backup" DBBackupCmd = "Database Backup" TableBackupCmd = "Table Backup" RawBackupCmd = "Raw Backup" EBSBackupCmd = "EBS Backup" )
const ( // FlagMergeRegionSizeBytes is the flag name of merge small regions by size FlagMergeRegionSizeBytes = "merge-region-size-bytes" // FlagMergeRegionKeyCount is the flag name of merge small regions by key count FlagMergeRegionKeyCount = "merge-region-key-count" // FlagPDConcurrency controls concurrency pd-relative operations like split & scatter. FlagPDConcurrency = "pd-concurrency" // FlagBatchFlushInterval controls after how long the restore batch would be auto sended. FlagBatchFlushInterval = "batch-flush-interval" // FlagDdlBatchSize controls batch ddl size to create a batch of tables FlagDdlBatchSize = "ddl-batch-size" // FlagWithPlacementPolicy corresponds to tidb config with-tidb-placement-mode // current only support STRICT or IGNORE, the default is STRICT according to tidb. FlagWithPlacementPolicy = "with-tidb-placement-mode" // FlagWaitTiFlashReady represents whether wait tiflash replica ready after table restored and checksumed. FlagWaitTiFlashReady = "wait-tiflash-ready" // FlagStreamStartTS and FlagStreamRestoreTS is used for log restore timestamp range. FlagStreamStartTS = "start-ts" FlagStreamRestoreTS = "restored-ts" // FlagStreamFullBackupStorage is used for log restore, represents the full backup storage. FlagStreamFullBackupStorage = "full-backup-storage" // FlagPiTRBatchCount and FlagPiTRBatchSize are used for restore log with batch method. FlagPiTRBatchCount = "pitr-batch-count" FlagPiTRBatchSize = "pitr-batch-size" FlagPiTRConcurrency = "pitr-concurrency" FlagResetSysUsers = "reset-sys-users" )
const ( FullRestoreCmd = "Full Restore" DBRestoreCmd = "DataBase Restore" TableRestoreCmd = "Table Restore" PointRestoreCmd = "Point Restore" RawRestoreCmd = "Raw Restore" )
Variables ¶
var ( StreamStart = "log start" StreamStop = "log stop" StreamPause = "log pause" StreamResume = "log resume" StreamStatus = "log status" StreamTruncate = "log truncate" StreamMetadata = "log metadata" StreamCtl = "log ctl" )
var StreamCommandMap = map[string]func(c context.Context, g glue.Glue, cmdName string, cfg *StreamConfig) error{ StreamStart: RunStreamStart, StreamStop: RunStreamStop, StreamPause: RunStreamPause, StreamResume: RunStreamResume, StreamStatus: RunStreamStatus, StreamTruncate: RunStreamTruncate, StreamMetadata: RunStreamMetadata, StreamCtl: RunStreamAdvancer, }
Functions ¶
func CheckRestoreDBAndTable ¶
func CheckRestoreDBAndTable(client *restore.Client, cfg *RestoreConfig) error
CheckRestoreDBAndTable is used to check whether the restore dbs or tables have been backup
func DefineBackupEBSFlags ¶
DefineBackupEBSFlags defines common flags for the backup command.
func DefineBackupFlags ¶
DefineBackupFlags defines common flags for the backup command.
func DefineCommonFlags ¶
DefineCommonFlags defines the flags common to all BRIE commands.
func DefineDatabaseFlags ¶
DefineDatabaseFlags defines the required --db flag for `db` subcommand.
func DefineFilterFlags ¶
DefineFilterFlags defines the --filter and --case-sensitive flags for `full` subcommand.
func DefineRawBackupFlags ¶
DefineRawBackupFlags defines common flags for the backup command.
func DefineRawRestoreFlags ¶
DefineRawRestoreFlags defines common flags for the backup command.
func DefineRestoreCommonFlags ¶
DefineRestoreCommonFlags defines common flags for the restore command.
func DefineRestoreFlags ¶
DefineRestoreFlags defines common flags for the restore tidb command.
func DefineRestoreSnapshotFlags ¶
DefineRestoreSnapshotFlags defines common flags for the backup command.
func DefineStreamCommonFlags ¶
DefineStreamCommonFlags define common flags for `stream task`
func DefineStreamPauseFlags ¶
func DefineStreamRestoreFlags ¶
DefineStreamRestoreFlags defines for the restore log command.
func DefineStreamStartFlags ¶
DefineStreamStartFlags defines flags used for `stream start`
func DefineTableFlags ¶
DefineTableFlags defines the required --db and --table flags for `table` subcommand.
func GetKeepalive ¶
func GetKeepalive(cfg *Config) keepalive.ClientParameters
GetKeepalive get the keepalive info from the config.
func GetStorage ¶
func GetStorage( ctx context.Context, storageName string, cfg *Config, ) (*backuppb.StorageBackend, storage.ExternalStorage, error)
GetStorage gets the storage backend from the config.
func HiddenFlagsForStream ¶
HiddenFlagsForStream temporary hidden flags that stream cmd not support.
func IsStreamRestore ¶
IsStreamRestore checks the command is `restore point`
func LogArguments ¶
LogArguments prints origin command arguments.
func NewMgr ¶
func NewMgr(ctx context.Context, g glue.Glue, pds []string, tlsConfig TLSConfig, keepalive keepalive.ClientParameters, checkRequirements bool, needDomain bool, versionCheckerType conn.VersionCheckerType, ) (*conn.Mgr, error)
NewMgr creates a new mgr at the given PD address.
func NewStreamMgr ¶
func ParseTLSTripleFromFlags ¶
ParseTLSTripleFromFlags parses the (ca, cert, key) triple from flags.
func ParseTSString ¶
ParseTSString port from tidb setSnapshotTS.
func ReadBackupMeta ¶
func ReadBackupMeta( ctx context.Context, fileName string, cfg *Config, ) (*backuppb.StorageBackend, storage.ExternalStorage, *backuppb.BackupMeta, error)
ReadBackupMeta reads the backupmeta file from the storage.
func ReadBackupMetaData ¶
func RunBackupEBS ¶
RunBackupEBS starts a backup task to backup volume vai EBS snapshot.
func RunBackupRaw ¶
RunBackupRaw starts a backup task inside the current goroutine.
func RunResolveKvData ¶
RunResolveKvData starts a restore task inside the current goroutine.
func RunRestore ¶
RunRestore starts a restore task inside the current goroutine.
func RunRestoreEBSMeta ¶
RunRestoreEBSMeta phase 1 of EBS based restore
func RunRestoreRaw ¶
func RunRestoreRaw(c context.Context, g glue.Glue, cmdName string, cfg *RestoreRawConfig) (err error)
RunRestoreRaw starts a raw kv restore task inside the current goroutine.
func RunStreamAdvancer ¶
func RunStreamCommand ¶
RunStreamCommand run all kinds of `stream task`
func RunStreamMetadata ¶
func RunStreamPause ¶
RunStreamPause specifies pausing a stream task.
func RunStreamRestore ¶
func RunStreamRestore( c context.Context, g glue.Glue, cmdName string, cfg *RestoreConfig, ) (err error)
RunStreamRestore restores stream log.
func RunStreamResume ¶
RunStreamResume specifies resuming a stream task.
func RunStreamStart ¶
RunStreamStart specifies starting a stream task
func RunStreamStatus ¶
RunStreamStatus get status for a specific stream task
func RunStreamStop ¶
RunStreamStop specifies stoping a stream task
func RunStreamTruncate ¶
RunStreamTruncate truncates the log that belong to (0, until-ts)
Types ¶
type BackupConfig ¶
type BackupConfig struct { Config TimeAgo time.Duration `json:"time-ago" toml:"time-ago"` BackupTS uint64 `json:"backup-ts" toml:"backup-ts"` LastBackupTS uint64 `json:"last-backup-ts" toml:"last-backup-ts"` GCTTL int64 `json:"gc-ttl" toml:"gc-ttl"` RemoveSchedulers bool `json:"remove-schedulers" toml:"remove-schedulers"` IgnoreStats bool `json:"ignore-stats" toml:"ignore-stats"` UseBackupMetaV2 bool `json:"use-backupmeta-v2"` UseCheckpoint bool `json:"use-checkpoint" toml:"use-checkpoint"` CompressionConfig // for ebs-based backup FullBackupType FullBackupType `json:"full-backup-type" toml:"full-backup-type"` VolumeFile string `json:"volume-file" toml:"volume-file"` SkipAWS bool `json:"skip-aws" toml:"skip-aws"` CloudAPIConcurrency uint `json:"cloud-api-concurrency" toml:"cloud-api-concurrency"` ProgressFile string `json:"progress-file" toml:"progress-file"` SkipPauseGCAndScheduler bool `json:"skip-pause-gc-and-scheduler" toml:"skip-pause-gc-and-scheduler"` }
BackupConfig is the configuration specific for backup tasks.
func (*BackupConfig) Adjust ¶
func (cfg *BackupConfig) Adjust()
Adjust is use for BR(binary) and BR in TiDB. When new config was add and not included in parser. we should set proper value in this function. so that both binary and TiDB will use same default value.
func (*BackupConfig) Hash ¶
func (cfg *BackupConfig) Hash() ([]byte, error)
a rough hash for checkpoint checker
func (*BackupConfig) ParseFromFlags ¶
func (cfg *BackupConfig) ParseFromFlags(flags *pflag.FlagSet) error
ParseFromFlags parses the backup-related flags from the flag set.
type CompressionConfig ¶
type CompressionConfig struct { CompressionType backuppb.CompressionType `json:"compression-type" toml:"compression-type"` CompressionLevel int32 `json:"compression-level" toml:"compression-level"` }
CompressionConfig is the configuration for sst file compression.
type Config ¶
type Config struct { storage.BackendOptions Storage string `json:"storage" toml:"storage"` PD []string `json:"pd" toml:"pd"` TLS TLSConfig `json:"tls" toml:"tls"` RateLimit uint64 `json:"rate-limit" toml:"rate-limit"` ChecksumConcurrency uint `json:"checksum-concurrency" toml:"checksum-concurrency"` Concurrency uint32 `json:"concurrency" toml:"concurrency"` Checksum bool `json:"checksum" toml:"checksum"` SendCreds bool `json:"send-credentials-to-tikv" toml:"send-credentials-to-tikv"` // LogProgress is true means the progress bar is printed to the log instead of stdout. LogProgress bool `json:"log-progress" toml:"log-progress"` // CaseSensitive should not be used. // // Deprecated: This field is kept only to satisfy the cyclic dependency with TiDB. This field // should be removed after TiDB upgrades the BR dependency. CaseSensitive bool // NoCreds means don't try to load cloud credentials NoCreds bool `json:"no-credentials" toml:"no-credentials"` CheckRequirements bool `json:"check-requirements" toml:"check-requirements"` // EnableOpenTracing is whether to enable opentracing EnableOpenTracing bool `json:"enable-opentracing" toml:"enable-opentracing"` // SkipCheckPath skips verifying the path // deprecated SkipCheckPath bool `json:"skip-check-path" toml:"skip-check-path"` // Filter should not be used, use TableFilter instead. // // Deprecated: This field is kept only to satisfy the cyclic dependency with TiDB. This field // should be removed after TiDB upgrades the BR dependency. Filter filter.MySQLReplicationRules FilterStr []string `json:"filter-strings" toml:"filter-strings"` TableFilter filter.Filter `json:"-" toml:"-"` SwitchModeInterval time.Duration `json:"switch-mode-interval" toml:"switch-mode-interval"` // Schemas is a database name set, to check whether the restore database has been backup Schemas map[string]struct{} // Tables is a table name set, to check whether the restore table has been backup Tables map[string]struct{} // GrpcKeepaliveTime is the interval of pinging the server. GRPCKeepaliveTime time.Duration `json:"grpc-keepalive-time" toml:"grpc-keepalive-time"` // GrpcKeepaliveTimeout is the max time a grpc conn can keep idel before killed. GRPCKeepaliveTimeout time.Duration `json:"grpc-keepalive-timeout" toml:"grpc-keepalive-timeout"` CipherInfo backuppb.CipherInfo `json:"-" toml:"-"` // whether there's explicit filter ExplicitFilter bool `json:"-" toml:"-"` // Metadata download batch size, such as metadata for log restore MetadataDownloadBatchSize uint `json:"metadata-download-batch-size" toml:"metadata-download-batch-size"` }
Config is the common configuration for all BRIE tasks.
type FullBackupType ¶
type FullBackupType string
FullBackupType type when doing full backup or restore
const ( FullBackupTypeKV FullBackupType = "kv" // default type FullBackupTypeEBS FullBackupType = "aws-ebs" )
type RawKvConfig ¶
type RawKvConfig struct { Config StartKey []byte `json:"start-key" toml:"start-key"` EndKey []byte `json:"end-key" toml:"end-key"` CF string `json:"cf" toml:"cf"` CompressionConfig RemoveSchedulers bool `json:"remove-schedulers" toml:"remove-schedulers"` }
RawKvConfig is the common config for rawkv backup and restore.
func (*RawKvConfig) ParseBackupConfigFromFlags ¶
func (cfg *RawKvConfig) ParseBackupConfigFromFlags(flags *pflag.FlagSet) error
ParseBackupConfigFromFlags parses the backup-related flags from the flag set.
func (*RawKvConfig) ParseFromFlags ¶
func (cfg *RawKvConfig) ParseFromFlags(flags *pflag.FlagSet) error
ParseFromFlags parses the raw kv backup&restore common flags from the flag set.
type RestoreCommonConfig ¶
type RestoreCommonConfig struct { Online bool `json:"online" toml:"online"` // MergeSmallRegionSizeBytes is the threshold of merging small regions (Default 96MB, region split size). // MergeSmallRegionKeyCount is the threshold of merging smalle regions (Default 960_000, region split key count). // See https://github.com/tikv/tikv/blob/v4.0.8/components/raftstore/src/coprocessor/config.rs#L35-L38 MergeSmallRegionSizeBytes uint64 `json:"merge-region-size-bytes" toml:"merge-region-size-bytes"` MergeSmallRegionKeyCount uint64 `json:"merge-region-key-count" toml:"merge-region-key-count"` // determines whether enable restore sys table on default, see fullClusterRestore in restore/client.go WithSysTable bool `json:"with-sys-table" toml:"with-sys-table"` ResetSysUsers []string `json:"reset-sys-users" toml:"reset-sys-users"` }
RestoreCommonConfig is the common configuration for all BR restore tasks.
func (*RestoreCommonConfig) ParseFromFlags ¶
func (cfg *RestoreCommonConfig) ParseFromFlags(flags *pflag.FlagSet) error
ParseFromFlags parses the config from the flag set.
type RestoreConfig ¶
type RestoreConfig struct { Config RestoreCommonConfig NoSchema bool `json:"no-schema" toml:"no-schema"` PDConcurrency uint `json:"pd-concurrency" toml:"pd-concurrency"` BatchFlushInterval time.Duration `json:"batch-flush-interval" toml:"batch-flush-interval"` // DdlBatchSize use to define the size of batch ddl to create tables DdlBatchSize uint `json:"ddl-batch-size" toml:"ddl-batch-size"` WithPlacementPolicy string `json:"with-tidb-placement-mode" toml:"with-tidb-placement-mode"` // FullBackupStorage is used to run `restore full` before `restore log`. // if it is empty, directly take restoring log justly. FullBackupStorage string `json:"full-backup-storage" toml:"full-backup-storage"` // [startTs, RestoreTS] is used to `restore log` from StartTS to RestoreTS. StartTS uint64 `json:"start-ts" toml:"start-ts"` RestoreTS uint64 `json:"restore-ts" toml:"restore-ts"` PitrBatchCount uint32 `json:"pitr-batch-count" toml:"pitr-batch-count"` PitrBatchSize uint32 `json:"pitr-batch-size" toml:"pitr-batch-size"` PitrConcurrency uint32 `json:"-" toml:"-"` WaitTiflashReady bool `json:"wait-tiflash-ready" toml:"wait-tiflash-ready"` // for ebs-based restore FullBackupType FullBackupType `json:"full-backup-type" toml:"full-backup-type"` Prepare bool `json:"prepare" toml:"prepare"` OutputFile string `json:"output-file" toml:"output-file"` SkipAWS bool `json:"skip-aws" toml:"skip-aws"` CloudAPIConcurrency uint `json:"cloud-api-concurrency" toml:"cloud-api-concurrency"` VolumeType pconfig.EBSVolumeType `json:"volume-type" toml:"volume-type"` VolumeIOPS int64 `json:"volume-iops" toml:"volume-iops"` VolumeThroughput int64 `json:"volume-throughput" toml:"volume-throughput"` ProgressFile string `json:"progress-file" toml:"progress-file"` TargetAZ string `json:"target-az" toml:"target-az"` // contains filtered or unexported fields }
RestoreConfig is the configuration specific for restore tasks.
func (*RestoreConfig) Adjust ¶
func (cfg *RestoreConfig) Adjust()
Adjust is use for BR(binary) and BR in TiDB. When new config was added and not included in parser. we should set proper value in this function. so that both binary and TiDB will use same default value.
func (*RestoreConfig) ParseFromFlags ¶
func (cfg *RestoreConfig) ParseFromFlags(flags *pflag.FlagSet) error
ParseFromFlags parses the restore-related flags from the flag set.
func (*RestoreConfig) ParseStreamRestoreFlags ¶
func (cfg *RestoreConfig) ParseStreamRestoreFlags(flags *pflag.FlagSet) error
ParseStreamRestoreFlags parses the `restore stream` flags from the flag set.
type RestoreFunc ¶
type RestoreFunc func() error
func KeepGcDisabled ¶
KeepGcDisabled keeps GC disabled and return a function that used to gc enabled. gc.ratio-threshold = "-1.0", which represents disable gc in TiKV.
type RestoreRawConfig ¶
type RestoreRawConfig struct { RawKvConfig RestoreCommonConfig }
RestoreRawConfig is the configuration specific for raw kv restore tasks.
func (*RestoreRawConfig) ParseFromFlags ¶
func (cfg *RestoreRawConfig) ParseFromFlags(flags *pflag.FlagSet) error
ParseFromFlags parses the backup-related flags from the flag set.
type StreamConfig ¶
type StreamConfig struct { Config TaskName string `json:"task-name" toml:"task-name"` // StartTS usually equals the tso of full-backup, but user can reset it StartTS uint64 `json:"start-ts" toml:"start-ts"` EndTS uint64 `json:"end-ts" toml:"end-ts"` // SafePointTTL ensures TiKV can scan entries not being GC at [startTS, currentTS] SafePointTTL int64 `json:"safe-point-ttl" toml:"safe-point-ttl"` // Spec for the command `truncate`, we should truncate the until when? Until uint64 `json:"until" toml:"until"` DryRun bool `json:"dry-run" toml:"dry-run"` SkipPrompt bool `json:"skip-prompt" toml:"skip-prompt"` // Spec for the command `status`. JSONOutput bool `json:"json-output" toml:"json-output"` // Spec for the command `advancer`. AdvancerCfg advancercfg.Config `json:"advancer-config" toml:"advancer-config"` }
StreamConfig specifies the configure about backup stream
func (*StreamConfig) ParseStreamCommonFromFlags ¶
func (cfg *StreamConfig) ParseStreamCommonFromFlags(flags *pflag.FlagSet) error
ParseStreamCommonFromFlags parse parameters for `stream task`
func (*StreamConfig) ParseStreamPauseFromFlags ¶
func (cfg *StreamConfig) ParseStreamPauseFromFlags(flags *pflag.FlagSet) error
ParseStreamPauseFromFlags parse parameters for `stream pause`
func (*StreamConfig) ParseStreamStartFromFlags ¶
func (cfg *StreamConfig) ParseStreamStartFromFlags(flags *pflag.FlagSet) error
ParseStreamStartFromFlags parse parameters for `stream start`
func (*StreamConfig) ParseStreamStatusFromFlags ¶
func (cfg *StreamConfig) ParseStreamStatusFromFlags(flags *pflag.FlagSet) error
func (*StreamConfig) ParseStreamTruncateFromFlags ¶
func (cfg *StreamConfig) ParseStreamTruncateFromFlags(flags *pflag.FlagSet) error
type TLSConfig ¶
type TLSConfig struct { CA string `json:"ca" toml:"ca"` Cert string `json:"cert" toml:"cert"` Key string `json:"key" toml:"key"` }
TLSConfig is the common configuration for TLS connection.
func (*TLSConfig) ParseFromFlags ¶
ParseFromFlags parses the TLS config from the flag set.
func (*TLSConfig) ToPDSecurityOption ¶
func (tls *TLSConfig) ToPDSecurityOption() pd.SecurityOption
Convert the TLS config to the PD security option.