Commit abfe9e57 authored by Jürgen Enge's avatar Jürgen Enge
Browse files

better display of dsn

parent a72d36c3
Pipeline #10415 passed with stages
in 5 minutes and 34 seconds
......@@ -27,7 +27,7 @@ MariaDB/MySQL Server with table structure of [table.sql](tables.sql)
http://localhost:83/[audience]/[subject]
https://media.memobase.k8s.unibas.ch/command/clearcache?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJjbWQ6Y2xlYXJjYWNoZSJ9.sZoTANdvTdoc1Kji_0_GxpgNWEU82G5b6Wkm8dfJgKs
https://media.memobase.k8s.unibas.ch/command/clearcache?token=XXX
sub: cmd:clearcache
### Docker
......
......@@ -74,9 +74,9 @@ func LoadConfig(filepath string) Config {
dsn := os.Getenv("DSN")
if dsn != "" {
conf.ResolverDBMySQL.Dsn = dsn
log.Printf("DSN from Environment: %s", dsn)
log.Printf("DSN from Environment: [%s]", conf.ResolverDBMySQL.Dsn)
} else {
log.Printf("DSN from Config: %s", conf.ResolverDBMySQL.Dsn)
log.Printf("DSN from Config: [%s]", conf.ResolverDBMySQL.Dsn)
}
return conf
......
......@@ -35,12 +35,13 @@ folder = "C:/temp"
[resolverDBMySQL]
#if dsn is empty, the static resolver will be used
#[username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN]
dsn = "test:HDNQiaqNqu4IjmUPATJr@tcp(localhost:3306)/test"
#dsn = "test:HDNQiaqNqu4IjmUPATJr@tcp(localhost:3306)/test"
dsn = "urlchecker:siex5ieNguuQuei@tcp(localhost:4306)/medienserver"
#dsn = ""
# should be smaller than server connection timeout to allow controlled reconnect
connMaxTimeout = "4h"
# query has to return the fields uri, access and protocol. One parameter
query = "SELECT uri, access, proto AS protocol, `status` FROM test.entities WHERE sig = ?"
query = "SELECT uri, access, proto AS protocol, `status` FROM medianserver.entities WHERE sig = ?"
schema = "test"
[signatures]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment