mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
embed: support experimental-corrupt-check-time flag
This commit is contained in:
parent
31381da53a
commit
1f734e0299
@ -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
|
||||||
|
@ -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 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user