config

package
v1.1.0-beta.0...-3047328 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2024 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConsistencyCheckTick = 5
	DefaultTryAdvanceThreshold  = 4 * time.Minute
	DefaultCheckPointLagLimit   = 48 * time.Hour
	DefaultBackOffTime          = 5 * time.Second
	DefaultTickInterval         = 12 * time.Second
	DefaultFullScanTick         = 4
	DefaultAdvanceByCache       = true
)

Variables

View Source
var (
	DefaultMaxConcurrencyAdvance = 8
)

Functions

func DefineFlagsForCheckpointAdvancerConfig

func DefineFlagsForCheckpointAdvancerConfig(f *pflag.FlagSet)

Types

type Config

type Config struct {
	// The gap between two retries.
	BackoffTime time.Duration `toml:"backoff-time" json:"backoff-time"`
	// The gap between calculating checkpoints.
	TickDuration time.Duration `toml:"tick-interval" json:"tick-interval"`
	// The threshold for polling TiKV for checkpoint of some range.
	TryAdvanceThreshold time.Duration `toml:"try-advance-threshold" json:"try-advance-threshold"`
	// The maximum lag could be tolerated for the checkpoint lag.
	CheckPointLagLimit time.Duration `toml:"check-point-lag-limit" json:"check-point-lag-limit"`
}

func Default

func Default() Config

func (Config) GetCheckPointLagLimit

func (conf Config) GetCheckPointLagLimit() time.Duration

GetCheckPointLagLimit returns the maximum lag could be tolerated for the checkpoint lag.

func (Config) GetDefaultStartPollThreshold

func (conf Config) GetDefaultStartPollThreshold() time.Duration

GetDefaultStartPollThreshold returns the threshold of begin polling the checkpoint in the normal condition (the subscribe manager is available.)

func (*Config) GetFromFlags

func (conf *Config) GetFromFlags(f *pflag.FlagSet) error

func (Config) GetSubscriberErrorStartPollThreshold

func (conf Config) GetSubscriberErrorStartPollThreshold() time.Duration

GetSubscriberErrorStartPollThreshold returns the threshold of begin polling the checkpoint when the subscriber meets error.

func (Config) TickTimeout

func (conf Config) TickTimeout() time.Duration

TickTimeout returns the max duration for each tick.

Jump to

Keyboard shortcuts

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