Browse Source

embed: support experimental-corrupt-check-time flag

Anthony Romano 8 years ago
parent
commit
1f734e0299
2 changed files with 6 additions and 0 deletions
  1. 5 0
      embed/config.go
  2. 1 0
      embed/etcd.go

+ 5 - 0
embed/config.go

@@ -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

+ 1 - 0
embed/etcd.go

@@ -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 {