mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
fix(peer): Pass peer server timeouts through factory
The peer's heartbeat and election timeouts are needed to build the transporter in the factory method.
This commit is contained in:
@@ -1,13 +1,9 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
const (
|
||||
// The amount of time to elapse without a heartbeat before becoming a candidate
|
||||
defaultElectionTimeout = 200 * time.Millisecond
|
||||
// The amount of time (in ms) to elapse without a heartbeat before becoming a candidate
|
||||
defaultElectionTimeout = 200
|
||||
|
||||
// The frequency by which heartbeats are sent to followers.
|
||||
defaultHeartbeatTimeout = 50 * time.Millisecond
|
||||
// The frequency (in ms) by which heartbeats are sent to followers.
|
||||
defaultHeartbeatTimeout = 50
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user