Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithRetryBackoff ¶
func WithRetryBackoff(ctx context.Context, maxRetryTimes uint, firstDuration time.Duration, f func(uint) bool)
WithRetryBackoff provides a general retry logic.
The given f will keep running, until: - f returns true. It means work is done. - retry times is greater than the given times - ctx is done.
Otherwise, this function will wait a time of the given duration in a backoff way, and continue to execute f.
The argument provided for f is the retried times.
Types ¶
type Component ¶
type Component struct { Kind ComponentKind Addr string // host:port }
type ComponentKind ¶
type ComponentKind string
const ( ComponentTiDB ComponentKind = "tidb" ComponentTiKV ComponentKind = "tikv" )
Click to show internal directories.
Click to hide internal directories.