mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-16 18:43:10 -06:00
23 lines
562 B
Go
23 lines
562 B
Go
package config
|
|
|
|
type Monolith struct {
|
|
HTTPBindAddr HTTPAddress `yaml:"http_bind_address"`
|
|
HTTPSBindAddr HTTPAddress `yaml:"https_bind_address"`
|
|
}
|
|
|
|
func (c *Monolith) Defaults(opts DefaultOpts) {
|
|
if !opts.Monolithic {
|
|
return
|
|
}
|
|
c.HTTPBindAddr = "http://:8008"
|
|
c.HTTPSBindAddr = "https://:8448"
|
|
}
|
|
|
|
func (c *Monolith) Verify(configErrs *ConfigErrors, isMonolith bool) {
|
|
if !isMonolith {
|
|
return
|
|
}
|
|
checkURL(configErrs, "monolith.http_bind_address", string(c.HTTPBindAddr))
|
|
checkURL(configErrs, "monolith.https_bind_address", string(c.HTTPSBindAddr))
|
|
}
|