mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
raft: makes 'ConnReadTimeout/ConnWriteTimeout' customizable
This commit is contained in:
@@ -37,8 +37,8 @@ const (
|
||||
// to keep the connection alive.
|
||||
// For short term pipeline connections, the connection MUST be killed to avoid it being
|
||||
// put back to http pkg connection pool.
|
||||
ConnReadTimeout = 5 * time.Second
|
||||
ConnWriteTimeout = 5 * time.Second
|
||||
DefaultConnReadTimeout = 5 * time.Second
|
||||
DefaultConnWriteTimeout = 5 * time.Second
|
||||
|
||||
recvBufSize = 4096
|
||||
// maxPendingProposals holds the proposals during one leader election process.
|
||||
@@ -55,6 +55,11 @@ const (
|
||||
sendSnap = "sendMsgSnap"
|
||||
)
|
||||
|
||||
var (
|
||||
ConnReadTimeout = DefaultConnReadTimeout
|
||||
ConnWriteTimeout = DefaultConnWriteTimeout
|
||||
)
|
||||
|
||||
type Peer interface {
|
||||
// send sends the message to the remote peer. The function is non-blocking
|
||||
// and has no promise that the message will be received by the remote.
|
||||
|
||||
Reference in New Issue
Block a user