From 1f734e0299e44cef5e9e00e369eee4b42fcfc3a2 Mon Sep 17 00:00:00 2001 From: Anthony Romano Date: Sat, 19 Aug 2017 02:40:15 -0700 Subject: [PATCH] embed: support experimental-corrupt-check-time flag --- embed/config.go | 5 +++++ embed/etcd.go | 1 + 2 files changed, 6 insertions(+) diff --git a/embed/config.go b/embed/config.go index 8e40eb360..9f1516b65 100644 --- a/embed/config.go +++ b/embed/config.go @@ -22,6 +22,7 @@ import ( "net/url" "path/filepath" "strings" + "time" "github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/pkg/cors" @@ -140,6 +141,10 @@ type Config struct { // auth AuthToken string `json:"auth-token"` + + // Experimental flags + + ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"` } // configYAML holds the config suitable for yaml parsing diff --git a/embed/etcd.go b/embed/etcd.go index 7388cfd13..fbf20d853 100644 --- a/embed/etcd.go +++ b/embed/etcd.go @@ -151,6 +151,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) { StrictReconfigCheck: cfg.StrictReconfigCheck, ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth, AuthToken: cfg.AuthToken, + CorruptCheckTime: cfg.ExperimentalCorruptCheckTime, } if e.Server, err = etcdserver.NewServer(srvcfg); err != nil {