From d03a066d4b8214d6712a2f2c12634b64ac92a3e7 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Tue, 11 Aug 2020 11:21:54 +0100 Subject: [PATCH] Tweaks to config --- internal/config/config_clientapi.go | 2 +- internal/config/config_global.go | 2 +- internal/config/config_kafka.go | 6 +++--- internal/config/config_test.go | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/internal/config/config_clientapi.go b/internal/config/config_clientapi.go index 6a57bc7da..ae146fcb5 100644 --- a/internal/config/config_clientapi.go +++ b/internal/config/config_clientapi.go @@ -27,7 +27,7 @@ type ClientAPI struct { // This Home Server's ReCAPTCHA private key. RecaptchaPrivateKey string `yaml:"recaptcha_private_key"` // Secret used to bypass the captcha registration entirely - RecaptchaBypassSecret string `yaml:"captcha_bypass_secret"` + RecaptchaBypassSecret string `yaml:"recaptcha_bypass_secret"` // HTTP API endpoint used to verify whether the captcha response // was successful RecaptchaSiteVerifyAPI string `yaml:"recaptcha_siteverify_api"` diff --git a/internal/config/config_global.go b/internal/config/config_global.go index 03f522be4..2b36da2f5 100644 --- a/internal/config/config_global.go +++ b/internal/config/config_global.go @@ -20,7 +20,7 @@ type Global struct { // An arbitrary string used to uniquely identify the PrivateKey. Must start with the // prefix "ed25519:". - KeyID gomatrixserverlib.KeyID `yaml:"-"` + KeyID gomatrixserverlib.KeyID `yaml:"key_id"` // How long a remote server can cache our server key for before requesting it again. // Increasing this number will reduce the number of requests made by remote servers diff --git a/internal/config/config_kafka.go b/internal/config/config_kafka.go index 43a27cf29..443995006 100644 --- a/internal/config/config_kafka.go +++ b/internal/config/config_kafka.go @@ -14,6 +14,9 @@ const ( type Kafka struct { // A list of kafka addresses to connect to. Addresses []string `yaml:"addresses"` + // The prefix to use for Kafka topic names for this homeserver - really only + // useful if running more than one Dendrite on the same Kafka deployment. + TopicPrefix string `yaml:"topic_prefix"` // Whether to use naffka instead of kafka. // Naffka can only be used when running dendrite as a single monolithic server. // Kafka can be used both with a monolithic server and when running the @@ -21,9 +24,6 @@ type Kafka struct { UseNaffka bool `yaml:"use_naffka"` // The Naffka database is used internally by the naffka library, if used. Database DatabaseOptions `yaml:"naffka_database"` - // The prefix to use for Kafka topic names for this homeserver - really only - // useful if running more than one Dendrite on the same Kafka deployment. - TopicPrefix string `yaml:"topic_prefix"` } func (k *Kafka) TopicFor(name string) string { diff --git a/internal/config/config_test.go b/internal/config/config_test.go index f1a025170..050debffd 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -37,19 +37,20 @@ version: 1 global: server_name: localhost private_key: matrix_key.pem + key_id: ed25519:auto key_validity_period: 168h0m0s trusted_third_party_id_servers: - matrix.org - vector.im kafka: addresses: [] + topic_prefix: Dendrite use_naffka: true naffka_database: connection_string: file:naffka.db max_open_conns: 100 max_idle_conns: 2 conn_max_lifetime: -1 - topic_prefix: Dendrite metrics: enabled: false basic_auth: @@ -72,7 +73,7 @@ client_api: enable_registration_captcha: false recaptcha_public_key: "" recaptcha_private_key: "" - captcha_bypass_secret: "" + recaptcha_bypass_secret: "" recaptcha_siteverify_api: "" turn: turn_user_lifetime: ""