Added a few more comments to mtredisalize and unexport a few symbols.

This commit is contained in:
Sascha L. Teichmann
2016-04-24 19:41:15 +02:00
parent 7ac3c67e63
commit 4dc43881c6
5 changed files with 30 additions and 15 deletions

View File

@@ -19,8 +19,8 @@ import (
const (
defaultMaxBulkStringSize = 32 * 1024 * 1024
GCDuration = "24h"
ChangeDuration = "30s"
defaultGCDuration = "24h"
defaultChangeDuration = "30s"
)
func usage() {
@@ -55,9 +55,9 @@ func main() {
flag.BoolVar(&interleaved,
"interleaved", false, "Backend stores key in interleaved form.")
flag.StringVar(&gcDuration,
"gc-duration", GCDuration, "Duration between forced GCs.")
"gc-duration", defaultGCDuration, "Duration between forced GCs.")
flag.StringVar(&changeDuration,
"change-duration", ChangeDuration, "Duration to aggregate changes.")
"change-duration", defaultChangeDuration, "Duration to aggregate changes.")
flag.StringVar(&changeURL, "change-url", "", "URL to send changes to.")
flag.Int64Var(&maxBulkStringSize, "max-bulk-string-size", defaultMaxBulkStringSize,
"max size of a bulk string to be accepted as input (in bytes).")
@@ -76,7 +76,7 @@ func main() {
backend Backend
gcDur time.Duration
chDur time.Duration
changeTracker *ChangeTracker
changeTracker *changeTracker
)
if gcDur, err = time.ParseDuration(gcDuration); err != nil {
@@ -94,7 +94,7 @@ func main() {
log.Fatal(err)
}
changeChan = time.Tick(chDur)
changeTracker = NewChangeTracker()
changeTracker = newChangeTracker()
} else {
// We will never receive ticks on this.
changeChan = make(<-chan time.Time)