Add heartbeat interval and election timeout

pull/1770/head
galal-hussein 2020-05-27 21:10:24 +02:00 committed by Darren Shepherd
parent 6b5b69378f
commit c580a8b528
2 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,8 @@ type ETCDConfig struct {
ServerTrust ServerTrust `json:"client-transport-security"`
PeerTrust PeerTrust `json:"peer-transport-security"`
ForceNewCluster bool `json:"force-new-cluster,omitempty"`
HeartbeatInterval int `json:"heartbeat-interval"`
ElectionTimeout int `json:"election-timeout"`
}
type ServerTrust struct {

View File

@ -389,6 +389,8 @@ func (e *ETCD) cluster(ctx context.Context, forceNew bool, options executor.Init
ClientCertAuth: true,
TrustedCAFile: e.config.Runtime.ETCDPeerCA,
},
ElectionTimeout: 5000,
HeartbeatInterval: 500,
})
}