config

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	DefaultConsistencyCheckTick = 5
	DefaultTryAdvanceThreshold  = 4 * time.Minute
	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"`
}

func Default

func Default() Config

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