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:
Brian Waldon
2014-01-14 08:53:02 -08:00
parent 97f1363afa
commit 32df6f92fc
5 changed files with 15 additions and 25 deletions

View File

@@ -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
)