operator

package
v1.1.0-beta.0...-681fa36 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: Apache-2.0, Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdaptEnvForSnapshotBackup

func AdaptEnvForSnapshotBackup(ctx context.Context, cfg *PauseGcConfig) error

AdaptEnvForSnapshotBackup blocks the current goroutine and pause the GC safepoint and remove the scheduler by the config. This function will block until the context being canceled.

func Base64ify

func Base64ify(ctx context.Context, cfg Base64ifyConfig) error

func DefineFlagsForBase64ifyConfig

func DefineFlagsForBase64ifyConfig(flags *pflag.FlagSet)

func DefineFlagsForChecksumTableConfig

func DefineFlagsForChecksumTableConfig(f *pflag.FlagSet)

func DefineFlagsForForceFlushConfig

func DefineFlagsForForceFlushConfig(f *pflag.FlagSet)

func DefineFlagsForListMigrationConfig

func DefineFlagsForListMigrationConfig(flags *pflag.FlagSet)

func DefineFlagsForMigrateToConfig

func DefineFlagsForMigrateToConfig(flags *pflag.FlagSet)

func DefineFlagsForPrepareSnapBackup

func DefineFlagsForPrepareSnapBackup(f *pflag.FlagSet)

func RunForceFlush

func RunForceFlush(ctx context.Context, cfg *ForceFlushConfig) error

func RunListMigrations

func RunListMigrations(ctx context.Context, cfg ListMigrationConfig) error

func RunMigrateTo

func RunMigrateTo(ctx context.Context, cfg MigrateToConfig) error

Types

type AdaptEnvForSnapshotBackupContext

type AdaptEnvForSnapshotBackupContext struct {
	context.Context
	// contains filtered or unexported fields
}

func (*AdaptEnvForSnapshotBackupContext) Close

func (*AdaptEnvForSnapshotBackupContext) GetBackOffer

func (cx *AdaptEnvForSnapshotBackupContext) GetBackOffer(operation string) utils.BackoffStrategy

func (*AdaptEnvForSnapshotBackupContext) ReadyL

func (cx *AdaptEnvForSnapshotBackupContext) ReadyL(name string, notes ...zap.Field)

type Base64ifyConfig

type Base64ifyConfig struct {
	storage.BackendOptions
	StorageURI string
	LoadCerd   bool
}

func (*Base64ifyConfig) ParseFromFlags

func (cfg *Base64ifyConfig) ParseFromFlags(flags *pflag.FlagSet) error

type ChecksumResult

type ChecksumResult struct {
	DBName    string `json:"db_name"`
	TableName string `json:"table_name"`

	Checksum   uint64 `json:"checksum"`
	TotalBytes uint64 `json:"total_bytes"`
	TotalKVs   uint64 `json:"total_kvs"`
}

type ChecksumWithRewriteRulesConfig

type ChecksumWithRewriteRulesConfig struct {
	task.Config
}

func (*ChecksumWithRewriteRulesConfig) ParseFromFlags

func (cfg *ChecksumWithRewriteRulesConfig) ParseFromFlags(flags *pflag.FlagSet) (err error)

type ForceFlushConfig

type ForceFlushConfig struct {
	task.Config

	// StoresPattern matches the address of TiKV.
	// The address usually looks like "<host>:20160".
	// You may list the store by `pd-ctl stores`.
	StoresPattern *regexp.Regexp
}

func (*ForceFlushConfig) ParseFromFlags

func (cfg *ForceFlushConfig) ParseFromFlags(flags *pflag.FlagSet) (err error)

type ListMigrationConfig

type ListMigrationConfig struct {
	storage.BackendOptions
	StorageURI string
	JSONOutput bool
}

func (*ListMigrationConfig) ParseFromFlags

func (cfg *ListMigrationConfig) ParseFromFlags(flags *pflag.FlagSet) error

type MigrateToConfig

type MigrateToConfig struct {
	storage.BackendOptions
	StorageURI string
	Recent     bool
	MigrateTo  int
	Base       bool

	Yes    bool
	DryRun bool
}

func (*MigrateToConfig) ParseFromFlags

func (cfg *MigrateToConfig) ParseFromFlags(flags *pflag.FlagSet) error

func (*MigrateToConfig) Verify

func (cfg *MigrateToConfig) Verify() error

type PauseGcConfig

type PauseGcConfig struct {
	task.Config

	SafePoint uint64 `json:"safepoint" yaml:"safepoint"`
	// SafePointID is used to identify a specific safepoint.
	// This field is only used in ***TEST*** now, you shouldn't use it in the src codes.
	SafePointID string        `json:"safepoint-id" yaml:"safepoint-id"`
	TTL         time.Duration `json:"ttl" yaml:"ttl"`

	OnAllReady func() `json:"-" yaml:"-"`
	OnExit     func() `json:"-" yaml:"-"`
}

func (*PauseGcConfig) ParseFromFlags

func (cfg *PauseGcConfig) ParseFromFlags(flags *pflag.FlagSet) error

ParseFromFlags fills the config via the flags.

Jump to

Keyboard shortcuts

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