Mercurial > gemma
comparison auth/connection.go @ 220:11d1a488b08f
Depend command line parsing on Viper/Cobra. Configuration should be persistent now.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 24 Jul 2018 17:45:17 +0200 |
parents | f345edb409b2 |
children | 33b59c848771 |
comparison
equal
deleted
inserted
replaced
219:ddc78991edbc | 220:11d1a488b08f |
---|---|
5 "errors" | 5 "errors" |
6 "io" | 6 "io" |
7 "log" | 7 "log" |
8 "sync" | 8 "sync" |
9 "time" | 9 "time" |
10 | |
11 "gemma.intevation.de/gemma/config" | |
12 ) | 10 ) |
13 | 11 |
14 var ErrNoSuchToken = errors.New("No such token") | 12 var ErrNoSuchToken = errors.New("No such token") |
15 | |
16 var ConnPool = func() *ConnectionPool { | |
17 cp, err := NewConnectionPool(config.Config.SessionStore) | |
18 if err != nil { | |
19 log.Panicf("Error with session store: %v\n", err) | |
20 } | |
21 return cp | |
22 }() | |
23 | 13 |
24 const ( | 14 const ( |
25 maxOpen = 16 | 15 maxOpen = 16 |
26 maxDBIdle = time.Minute * 5 | 16 maxDBIdle = time.Minute * 5 |
27 ) | 17 ) |