2019-11-08 21:45:10 +00:00
|
|
|
package protocol
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
)
|
|
|
|
|
|
|
|
// Config holds various configuration parameters for a dqlite client.
|
|
|
|
type Config struct {
|
2020-04-23 20:34:44 +00:00
|
|
|
Dial DialFunc // Network dialer.
|
|
|
|
DialTimeout time.Duration // Timeout for establishing a network connection .
|
|
|
|
AttemptTimeout time.Duration // Timeout for each individual attempt to probe a server's leadership.
|
|
|
|
BackoffFactor time.Duration // Exponential backoff factor for retries.
|
|
|
|
BackoffCap time.Duration // Maximum connection retry backoff value,
|
|
|
|
RetryLimit uint // Maximum number of retries, or 0 for unlimited.
|
2019-11-08 21:45:10 +00:00
|
|
|
}
|