1
0
Fork 0

Initialize snapConf

master
Philip O'Toole 10 years ago
parent c7160a6d96
commit 2c01218169

@ -34,7 +34,7 @@ func init() {
flag.StringVar(&cpuprofile, "cpuprofile", "", "write CPU profile to file")
flag.StringVar(&logFile, "logfile", "stdout", "log file path")
flag.StringVar(&logLevel, "loglevel", "INFO", "log level (ERROR|WARN|INFO|DEBUG|TRACE)")
flag.IntVar(&snapAfter, "s", 1000, "Snapshot after every number of log entries")
flag.IntVar(&snapAfter, "s", 1000, "Snapshot and compact after this number of new log entries")
flag.Usage = func() {
fmt.Fprintf(os.Stderr, "Usage: %s [arguments] <data-path> \n", os.Args[0])
flag.PrintDefaults()

@ -153,6 +153,7 @@ func New(dataDir string, dbfile string, snapAfter int, host string, port int) *S
path: dataDir,
dbPath: dbPath,
db: db.New(dbPath),
snapConf: &SnapshotConf{snapshotAfter: uint64(snapAfter)},
metrics: NewServerMetrics(),
diagnostics: NewServerDiagnostics(),
router: mux.NewRouter(),

Loading…
Cancel
Save