Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type C ¶
type C struct {
AppName string `env:"APP_NAME" default:"relay"`
Listen string `env:"LISTEN" default:"0.0.0.0" usage:"network listen address"`
Port int `env:"PORT" default:"3334" usage:"port to listen on"` // PORT is used by heroku
Pprof bool `env:"PPROF" default:"false" usage:"enable pprof on 127.0.0.1:6060"`
MemLimit int64 `env:"MEM_LIMIT" default:"250000000" usage:"set memory limit, default is 250Mb"`
}
C is the configuration for a relay. Note that it is absolutely minimal. More complex configurations should generally be stored in the database, where APIs make them easy to modify.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package keyvalue provides tools to convert any config struct using go-simpler/env struct tagged configuration structures into a sortable slice of key-values, and a printer to render them as a bash shell script to set the variables from a configuration file.
|
Package keyvalue provides tools to convert any config struct using go-simpler/env struct tagged configuration structures into a sortable slice of key-values, and a printer to render them as a bash shell script to set the variables from a configuration file. |
Click to show internal directories.
Click to hide internal directories.