aboutsummaryrefslogtreecommitdiff
path: root/setup/base
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-05-09 14:15:24 +0100
committerGitHub <noreply@github.com>2022-05-09 14:15:24 +0100
commit09d754cfbf9268044d0f59fbe509640b8d71e011 (patch)
tree23922c3b718c3317651fcd95da85f6f0765662f4 /setup/base
parent79e2fbc66368d8f4754b9fff8005d3e77969fcc4 (diff)
One NATS instance per `BaseDendrite` (#2438)
* One NATS instance per `BaseDendrite` * Fix roomserver
Diffstat (limited to 'setup/base')
-rw-r--r--setup/base/base.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/setup/base/base.go b/setup/base/base.go
index ef449cc3..0e7528a0 100644
--- a/setup/base/base.go
+++ b/setup/base/base.go
@@ -41,6 +41,7 @@ import (
"golang.org/x/net/http2/h2c"
"github.com/matrix-org/dendrite/internal"
+ "github.com/matrix-org/dendrite/setup/jetstream"
"github.com/matrix-org/dendrite/setup/process"
"github.com/gorilla/mux"
@@ -77,6 +78,7 @@ type BaseDendrite struct {
InternalAPIMux *mux.Router
DendriteAdminMux *mux.Router
SynapseAdminMux *mux.Router
+ NATS *jetstream.NATSInstance
UseHTTPAPIs bool
apiHttpClient *http.Client
Cfg *config.Dendrite
@@ -240,6 +242,7 @@ func NewBaseDendrite(cfg *config.Dendrite, componentName string, options ...Base
InternalAPIMux: mux.NewRouter().SkipClean(true).PathPrefix(httputil.InternalPathPrefix).Subrouter().UseEncodedPath(),
DendriteAdminMux: mux.NewRouter().SkipClean(true).PathPrefix(httputil.DendriteAdminPathPrefix).Subrouter().UseEncodedPath(),
SynapseAdminMux: mux.NewRouter().SkipClean(true).PathPrefix(httputil.SynapseAdminPathPrefix).Subrouter().UseEncodedPath(),
+ NATS: &jetstream.NATSInstance{},
apiHttpClient: &apiClient,
Database: db, // set if monolith with global connection pool only
DatabaseWriter: writer, // set if monolith with global connection pool only