embed: support experimental-corrupt-check-time flag

This commit is contained in:
Anthony Romano 2017-08-19 02:40:15 -07:00
parent 31381da53a
commit 1f734e0299
2 changed files with 6 additions and 0 deletions

View File

@ -22,6 +22,7 @@ import (
"net/url" "net/url"
"path/filepath" "path/filepath"
"strings" "strings"
"time"
"github.com/coreos/etcd/etcdserver" "github.com/coreos/etcd/etcdserver"
"github.com/coreos/etcd/pkg/cors" "github.com/coreos/etcd/pkg/cors"
@ -140,6 +141,10 @@ type Config struct {
// auth // auth
AuthToken string `json:"auth-token"` AuthToken string `json:"auth-token"`
// Experimental flags
ExperimentalCorruptCheckTime time.Duration `json:"experimental-corrupt-check-time"`
} }
// configYAML holds the config suitable for yaml parsing // configYAML holds the config suitable for yaml parsing

View File

@ -151,6 +151,7 @@ func StartEtcd(inCfg *Config) (e *Etcd, err error) {
StrictReconfigCheck: cfg.StrictReconfigCheck, StrictReconfigCheck: cfg.StrictReconfigCheck,
ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth, ClientCertAuthEnabled: cfg.ClientTLSInfo.ClientCertAuth,
AuthToken: cfg.AuthToken, AuthToken: cfg.AuthToken,
CorruptCheckTime: cfg.ExperimentalCorruptCheckTime,
} }
if e.Server, err = etcdserver.NewServer(srvcfg); err != nil { if e.Server, err = etcdserver.NewServer(srvcfg); err != nil {