remove DefaultConfig global (only used once). Fix data-dir comment

This commit is contained in:
Matthew Jaffee 2018-04-15 17:20:14 -05:00
parent 0c35094bfc
commit 7233597f35
No known key found for this signature in database
GPG key ID: 51C676AF9FFCDB87
2 changed files with 3 additions and 5 deletions

View file

@ -25,9 +25,6 @@ const (
ClusterGossip = "gossip"
)
// DefaultConfig is a Config structure that holds all the default values.
var DefaultConfig = NewConfig()
// TLSConfig contains TLS configuration
type TLSConfig struct {
// CertificatePath contains the path to the certificate (.crt or .pem file)
@ -40,7 +37,8 @@ type TLSConfig struct {
// Config represents the configuration for the command.
type Config struct {
// DataDir is the default data directory.
// DataDir is the directory where Pilosa stores both indexed data and
// running state such as cluster topology information.
DataDir string `toml:"data-dir"`
// Bind is the host:port on which Pilosa will listen.
Bind string `toml:"bind"`

View file

@ -107,7 +107,7 @@ func NewServer() *Server {
NewAttrStore: NewNopAttrStore,
AntiEntropyInterval: time.Duration(DefaultConfig.AntiEntropy.Interval),
AntiEntropyInterval: time.Duration(NewConfig().AntiEntropy.Interval),
MetricInterval: 0,
DiagnosticInterval: 0,