2020-07-26 17:09:05 +08:00
|
|
|
package internal
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
const (
|
2021-02-27 23:56:18 +08:00
|
|
|
// Delimiter is a separator that separates the etcd path.
|
|
|
|
Delimiter = '/'
|
|
|
|
|
2020-07-26 17:09:05 +08:00
|
|
|
autoSyncInterval = time.Minute
|
|
|
|
coolDownInterval = time.Second
|
|
|
|
dialTimeout = 5 * time.Second
|
|
|
|
requestTimeout = 3 * time.Second
|
|
|
|
endpointsSeparator = ","
|
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2021-02-27 23:56:18 +08:00
|
|
|
// DialTimeout is the dial timeout.
|
|
|
|
DialTimeout = dialTimeout
|
|
|
|
// RequestTimeout is the request timeout.
|
2020-07-26 17:09:05 +08:00
|
|
|
RequestTimeout = requestTimeout
|
2021-02-27 23:56:18 +08:00
|
|
|
// NewClient is used to create etcd clients.
|
|
|
|
NewClient = DialClient
|
2020-07-26 17:09:05 +08:00
|
|
|
)
|