etcdserver: support Raft Pre-Vote

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
This commit is contained in:
Gyuho Lee
2018-02-22 21:19:23 -08:00
parent 8aae8c1c9c
commit 78918848bd
3 changed files with 12 additions and 0 deletions

View File

@ -258,6 +258,12 @@ type EtcdServer struct {
// NewServer creates a new EtcdServer from the supplied configuration. The
// configuration is considered static for the lifetime of the EtcdServer.
func NewServer(cfg ServerConfig) (srv *EtcdServer, err error) {
if cfg.PreVote {
plog.Info("Raft Pre-Vote is enabled")
} else {
plog.Info("Raft Pre-Vote is disabled")
}
st := v2store.New(StoreClusterPrefix, StoreKeysPrefix)
var (