aboutsummaryrefslogtreecommitdiff
path: root/federationapi/routing/routing.go
diff options
context:
space:
mode:
authorTill <2353100+S7evinK@users.noreply.github.com>2023-03-22 09:21:32 +0100
committerGitHub <noreply@github.com>2023-03-22 09:21:32 +0100
commit5e85a00cb36c3d343cd5b6f6a18435989724a135 (patch)
treeb22c34dd0a6cdc04025b90086843f9084a876412 /federationapi/routing/routing.go
parentec6879e5ae2919c903707475ce8d72244b2a6847 (diff)
Remove `BaseDendrite` (#3023)
Removes `BaseDendrite` to, hopefully, make testing and composing of components easier in the future.
Diffstat (limited to 'federationapi/routing/routing.go')
-rw-r--r--federationapi/routing/routing.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/federationapi/routing/routing.go b/federationapi/routing/routing.go
index c86d18d2..a1f943e7 100644
--- a/federationapi/routing/routing.go
+++ b/federationapi/routing/routing.go
@@ -31,7 +31,6 @@ import (
"github.com/matrix-org/dendrite/internal/httputil"
"github.com/matrix-org/dendrite/roomserver/api"
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
- "github.com/matrix-org/dendrite/setup/base"
"github.com/matrix-org/dendrite/setup/config"
userapi "github.com/matrix-org/dendrite/userapi/api"
"github.com/matrix-org/gomatrixserverlib"
@@ -55,7 +54,8 @@ const (
// applied:
// nolint: gocyclo
func Setup(
- base *base.BaseDendrite,
+ routers httputil.Routers,
+ dendriteCfg *config.Dendrite,
rsAPI roomserverAPI.FederationRoomserverAPI,
fsAPI *fedInternal.FederationInternalAPI,
keys gomatrixserverlib.JSONVerifier,
@@ -63,14 +63,14 @@ func Setup(
userAPI userapi.FederationUserAPI,
mscCfg *config.MSCs,
servers federationAPI.ServersInRoomProvider,
- producer *producers.SyncAPIProducer,
+ producer *producers.SyncAPIProducer, enableMetrics bool,
) {
- fedMux := base.Routers.Federation
- keyMux := base.Routers.Keys
- wkMux := base.Routers.WellKnown
- cfg := &base.Cfg.FederationAPI
+ fedMux := routers.Federation
+ keyMux := routers.Keys
+ wkMux := routers.WellKnown
+ cfg := &dendriteCfg.FederationAPI
- if base.EnableMetrics {
+ if enableMetrics {
prometheus.MustRegister(
internal.PDUCountTotal, internal.EDUCountTotal,
)