0eb1c3016dc0b3666275f0bfc8769b56c2040062
[arvados.git] / services / boot / config.go
1 package main
2
3 type Config struct {
4         // 5 alphanumeric chars. Must be either xx*, yy*, zz*, or
5         // globally unique.
6         SiteID string
7
8         // Hostnames or IP addresses of control hosts. Use at least 3
9         // in production. System functions only when a majority are
10         // alive.
11         ControlHosts []string
12
13         // addr:port to serve web-based setup/monitoring application
14         WebListen string
15
16         UsrDir  string
17         DataDir string
18 }
19
20 func (c *Config) SetDefaults() {
21         if len(c.ControlHosts) == 0 {
22                 c.ControlHosts = []string{"127.0.0.1"}
23         }
24         if c.DataDir == "" {
25                 c.DataDir = "/var/lib/arvados"
26         }
27         if c.UsrDir == "" {
28                 c.DataDir = "/usr/local"
29         }
30         if c.WebListen == "" {
31                 c.WebListen = "localhost:8000"
32         }
33 }