mirror of
https://github.com/matrix-org/dendrite
synced 2024-11-09 11:21:08 +01:00
11d9b9db0e
This removes most of the code used for polylith/API mode. This removes the `/api` internal endpoints entirely. Binary size change roughly 5%: ``` 51437560 Feb 13 10:15 dendrite-monolith-server # old 48759008 Feb 13 10:15 dendrite-monolith-server # new ```
21 lines
510 B
Go
21 lines
510 B
Go
package config
|
|
|
|
type RoomServer struct {
|
|
Matrix *Global `yaml:"-"`
|
|
|
|
Database DatabaseOptions `yaml:"database,omitempty"`
|
|
}
|
|
|
|
func (c *RoomServer) Defaults(opts DefaultOpts) {
|
|
if opts.Generate {
|
|
if !opts.SingleDatabase {
|
|
c.Database.ConnectionString = "file:roomserver.db"
|
|
}
|
|
}
|
|
}
|
|
|
|
func (c *RoomServer) Verify(configErrs *ConfigErrors) {
|
|
if c.Matrix.DatabaseOptions.ConnectionString == "" {
|
|
checkNotEmpty(configErrs, "room_server.database.connection_string", string(c.Database.ConnectionString))
|
|
}
|
|
}
|