mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-01 13:52:46 +00:00
One NATS instance per BaseDendrite
(#2438)
* One NATS instance per `BaseDendrite` * Fix roomserver
This commit is contained in:
parent
79e2fbc663
commit
09d754cfbf
11 changed files with 49 additions and 37 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue