11870: minor update
[arvados.git] / services / ws / config.go
1 package main
2
3 import (
4         "time"
5
6         "git.curoverse.com/arvados.git/sdk/go/arvados"
7 )
8
9 type wsConfig struct {
10         Client       arvados.Client
11         Postgres     pgConfig
12         PostgresPool int
13         Listen       string
14         LogLevel     string
15         LogFormat    string
16
17         PingTimeout      arvados.Duration
18         ClientEventQueue int
19         ServerEventQueue int
20
21         ManagementToken string
22 }
23
24 func defaultConfig() wsConfig {
25         return wsConfig{
26                 Client: arvados.Client{
27                         APIHost: "localhost:443",
28                 },
29                 Postgres: pgConfig{
30                         "dbname":                    "arvados_production",
31                         "user":                      "arvados",
32                         "password":                  "xyzzy",
33                         "host":                      "localhost",
34                         "connect_timeout":           "30",
35                         "sslmode":                   "require",
36                         "fallback_application_name": "arvados-ws",
37                 },
38                 PostgresPool:     64,
39                 LogLevel:         "info",
40                 LogFormat:        "json",
41                 PingTimeout:      arvados.Duration(time.Minute),
42                 ClientEventQueue: 64,
43                 ServerEventQueue: 4,
44         }
45 }