diff options
author | Neil Alexander <neilalexander@users.noreply.github.com> | 2020-05-18 10:56:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-18 10:56:43 +0100 |
commit | dce4f436f77b71155483a47a6ad14da5c0ae5d6a (patch) | |
tree | 8a6202e52790878bdcd5e7f12205d2d179f86ac5 /cmd/dendrite-monolith-server | |
parent | bfb954519bdf172451d999ac4c654b3d15eff124 (diff) |
Add -api flag to monolith (#1044)
* Add flag for enabling HTTP APIs in monolith mode
* Flag -api
* Only start HTTP APIs if needed
Diffstat (limited to 'cmd/dendrite-monolith-server')
-rw-r--r-- | cmd/dendrite-monolith-server/main.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cmd/dendrite-monolith-server/main.go b/cmd/dendrite-monolith-server/main.go index f2261061..23959152 100644 --- a/cmd/dendrite-monolith-server/main.go +++ b/cmd/dendrite-monolith-server/main.go @@ -41,15 +41,16 @@ import ( ) var ( - httpBindAddr = flag.String("http-bind-address", ":8008", "The HTTP listening port for the server") - httpsBindAddr = flag.String("https-bind-address", ":8448", "The HTTPS listening port for the server") - certFile = flag.String("tls-cert", "", "The PEM formatted X509 certificate to use for TLS") - keyFile = flag.String("tls-key", "", "The PEM private key to use for TLS") + httpBindAddr = flag.String("http-bind-address", ":8008", "The HTTP listening port for the server") + httpsBindAddr = flag.String("https-bind-address", ":8448", "The HTTPS listening port for the server") + certFile = flag.String("tls-cert", "", "The PEM formatted X509 certificate to use for TLS") + keyFile = flag.String("tls-key", "", "The PEM private key to use for TLS") + enableHTTPAPIs = flag.Bool("api", false, "Expose internal HTTP APIs in monolith mode") ) func main() { cfg := basecomponent.ParseMonolithFlags() - base := basecomponent.NewBaseDendrite(cfg, "Monolith") + base := basecomponent.NewBaseDendrite(cfg, "Monolith", *enableHTTPAPIs) defer base.Close() // nolint: errcheck accountDB := base.CreateAccountsDB() |