Default values tweak

This commit is contained in:
Jakob Borg
2015-09-20 22:17:48 +02:00
parent 425f61cf34
commit e1339628d9

View File

@@ -53,12 +53,14 @@ var (
dir string = "" dir string = ""
evictionTime time.Duration = time.Hour evictionTime time.Duration = time.Hour
debug bool = false debug bool = false
getLRUSize int = 10240 getLRUSize int = 10 << 10
getLimit time.Duration
getLimitBurst int64 = 10 getLimitBurst int64 = 10
postLRUSize int = 128 getLimitAvg = 1
postLimit time.Duration postLRUSize int = 1 << 10
postLimitBurst int64 = 2 postLimitBurst int64 = 2
postLimitAvg = 1
getLimit time.Duration
postLimit time.Duration
getMut sync.RWMutex = sync.NewRWMutex() getMut sync.RWMutex = sync.NewRWMutex()
getLRUCache *lru.Cache getLRUCache *lru.Cache
@@ -75,8 +77,6 @@ var (
) )
func main() { func main() {
var getLimitAvg, postLimitAvg int
flag.StringVar(&listen, "listen", listen, "Listen address") flag.StringVar(&listen, "listen", listen, "Listen address")
flag.StringVar(&dir, "keys", dir, "Directory where http-cert.pem and http-key.pem is stored for TLS listening") flag.StringVar(&dir, "keys", dir, "Directory where http-cert.pem and http-key.pem is stored for TLS listening")
flag.BoolVar(&debug, "debug", debug, "Enable debug output") flag.BoolVar(&debug, "debug", debug, "Enable debug output")