Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Config = &configuration{ Server: server{ Address: "127.0.0.1", Port: defaultPoseidonPort, SystemdSocketActivation: false, Token: "", TLS: TLS{ Active: false, CAFile: "", CertFile: "", KeyFile: "", }, InteractiveStderr: true, TemplateJobFile: "", Alert: alert{ PrewarmingPoolThreshold: 0, PrewarmingPoolReloadTimeout: 0, }, LoggingFilterToken: randomFilterToken(), }, Nomad: Nomad{ Enabled: true, Address: "127.0.0.1", Port: defaultNomadPort, Token: "", TLS: TLS{ Active: false, CAFile: "", CertFile: "", KeyFile: "", }, Namespace: "default", DisableForcePull: false, Network: nomadApi.NetworkResource{ Mode: "bridge", DNS: nil, }, }, AWS: AWS{ Enabled: false, Endpoint: "", Functions: []string{}, }, Logger: Logger{ Level: "INFO", Formatter: dto.FormatterText, }, Profiling: Profiling{ MemoryThreshold: defaultMemoryUsageAlertThreshold, }, Sentry: sentry.ClientOptions{ AttachStacktrace: true, }, InfluxDB: InfluxDB{ URL: "", Token: "", Organization: "", Bucket: "", Stage: "", }, } TLSConfig = &tls.Config{ MinVersion: tls.VersionTLS13, CurvePreferences: []tls.CurveID{tls.CurveP521, tls.CurveP384, tls.CurveP256}, } ErrConfigInitialized = errors.New("configuration is already initialized") )
Config contains the default configuration of Poseidon.
Functions ¶
func InitConfig ¶
func InitConfig() error
InitConfig merges configuration options from environment variables and a configuration file into the default configuration. Calls of InitConfig after the first call have no effect and return an error. InitConfig should be called directly after starting the program.
Types ¶
type AWS ¶
type AWS struct {
Enabled bool `yaml:"enabled"`
Endpoint string `yaml:"endpoint"`
Functions []string `yaml:"functions"`
}
AWS configures the AWS Lambda usage.
type InfluxDB ¶
type InfluxDB struct {
URL string `yaml:"url"`
Token string `yaml:"token"`
Organization string `yaml:"organization"`
Bucket string `yaml:"bucket"`
Stage string `yaml:"stage"`
}
InfluxDB configures the usage of an Influx db monitoring.
type Nomad ¶
type Nomad struct {
Enabled bool `yaml:"enabled"`
Address string `yaml:"address"`
Port int `yaml:"port"`
Token string `yaml:"token"`
TLS TLS `yaml:"tls"`
Namespace string `yaml:"namespace"`
DisableForcePull bool `yaml:"disableforcepull"`
Network nomadApi.NetworkResource `yaml:"network"`
}
Nomad configures the used Nomad cluster.
Click to show internal directories.
Click to hide internal directories.