Commit c580a8b5 authored by galal-hussein's avatar galal-hussein Committed by Darren Shepherd

Add heartbeat interval and election timeout

parent 6b5b6937
...@@ -38,6 +38,8 @@ type ETCDConfig struct { ...@@ -38,6 +38,8 @@ type ETCDConfig struct {
ServerTrust ServerTrust `json:"client-transport-security"` ServerTrust ServerTrust `json:"client-transport-security"`
PeerTrust PeerTrust `json:"peer-transport-security"` PeerTrust PeerTrust `json:"peer-transport-security"`
ForceNewCluster bool `json:"force-new-cluster,omitempty"` ForceNewCluster bool `json:"force-new-cluster,omitempty"`
HeartbeatInterval int `json:"heartbeat-interval"`
ElectionTimeout int `json:"election-timeout"`
} }
type ServerTrust struct { type ServerTrust struct {
......
...@@ -389,6 +389,8 @@ func (e *ETCD) cluster(ctx context.Context, forceNew bool, options executor.Init ...@@ -389,6 +389,8 @@ func (e *ETCD) cluster(ctx context.Context, forceNew bool, options executor.Init
ClientCertAuth: true, ClientCertAuth: true,
TrustedCAFile: e.config.Runtime.ETCDPeerCA, TrustedCAFile: e.config.Runtime.ETCDPeerCA,
}, },
ElectionTimeout: 5000,
HeartbeatInterval: 500,
}) })
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment