move constants out for windows

This commit is contained in:
Barak Michener
2014-12-18 18:56:56 -05:00
parent a0d72fb00c
commit 977c74069c
3 changed files with 18 additions and 2 deletions

8
etcdmain/const_unix.go Normal file
View File

@ -0,0 +1,8 @@
// +build !windows,!plan9
package etcdmain
const (
defaultMaxSnapshots = 5
defaultMaxWALs = 5
)

View File

@ -0,0 +1,8 @@
// +build windows
package etcdmain
const (
defaultMaxSnapshots = 0
defaultMaxWALs = 0
)

View File

@ -63,8 +63,8 @@ var (
snapCount = fs.Uint64("snapshot-count", etcdserver.DefaultSnapCount, "Number of committed transactions to trigger a snapshot") snapCount = fs.Uint64("snapshot-count", etcdserver.DefaultSnapCount, "Number of committed transactions to trigger a snapshot")
printVersion = fs.Bool("version", false, "Print the version and exit") printVersion = fs.Bool("version", false, "Print the version and exit")
forceNewCluster = fs.Bool("force-new-cluster", false, "Force to create a new one member cluster") forceNewCluster = fs.Bool("force-new-cluster", false, "Force to create a new one member cluster")
maxSnapFiles = fs.Uint("max-snapshots", 5, "Maximum number of snapshot files to retain (0 is unlimited)") maxSnapFiles = fs.Uint("max-snapshots", defaultMaxSnapshots, "Maximum number of snapshot files to retain (0 is unlimited)")
maxWalFiles = fs.Uint("max-wals", 5, "Maximum number of wal files to retain (0 is unlimited)") maxWalFiles = fs.Uint("max-wals", defaultMaxWALs, "Maximum number of wal files to retain (0 is unlimited)")
initialCluster = fs.String("initial-cluster", "default=http://localhost:2380,default=http://localhost:7001", "Initial cluster configuration for bootstrapping") initialCluster = fs.String("initial-cluster", "default=http://localhost:2380,default=http://localhost:7001", "Initial cluster configuration for bootstrapping")
initialClusterToken = fs.String("initial-cluster-token", "etcd-cluster", "Initial cluster token for the etcd cluster during bootstrap") initialClusterToken = fs.String("initial-cluster-token", "etcd-cluster", "Initial cluster token for the etcd cluster during bootstrap")