mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-29 12:42:46 +00:00
Remove publicroomsapi (#1176)
* Remove all of publicroomsapi * Remove references to publicroomsapi * Remove doc references to publicroomsapi
This commit is contained in:
parent
4c1e6597c0
commit
9c1f38621c
46 changed files with 160 additions and 2528 deletions
|
@ -186,9 +186,6 @@ type Dendrite struct {
|
|||
// The AppServices database stores information used by the AppService component.
|
||||
// It is only accessed by the AppService component.
|
||||
AppService DataSource `yaml:"appservice"`
|
||||
// The PublicRoomsAPI database stores information used to compute the public
|
||||
// room directory. It is only accessed by the PublicRoomsAPI server.
|
||||
PublicRoomsAPI DataSource `yaml:"public_rooms_api"`
|
||||
// The Naffka database is used internally by the naffka library, if used.
|
||||
Naffka DataSource `yaml:"naffka,omitempty"`
|
||||
// Maximum open connections to the DB (0 = use default, negative means unlimited)
|
||||
|
@ -233,7 +230,6 @@ type Dendrite struct {
|
|||
UserAPI Address `yaml:"user_api"`
|
||||
RoomServer Address `yaml:"room_server"`
|
||||
FederationSender Address `yaml:"federation_sender"`
|
||||
PublicRoomsAPI Address `yaml:"public_rooms_api"`
|
||||
EDUServer Address `yaml:"edu_server"`
|
||||
KeyServer Address `yaml:"key_server"`
|
||||
} `yaml:"bind"`
|
||||
|
@ -250,7 +246,6 @@ type Dendrite struct {
|
|||
UserAPI Address `yaml:"user_api"`
|
||||
RoomServer Address `yaml:"room_server"`
|
||||
FederationSender Address `yaml:"federation_sender"`
|
||||
PublicRoomsAPI Address `yaml:"public_rooms_api"`
|
||||
EDUServer Address `yaml:"edu_server"`
|
||||
KeyServer Address `yaml:"key_server"`
|
||||
} `yaml:"listen"`
|
||||
|
|
|
@ -19,6 +19,7 @@ import (
|
|||
"github.com/gorilla/mux"
|
||||
appserviceAPI "github.com/matrix-org/dendrite/appservice/api"
|
||||
"github.com/matrix-org/dendrite/clientapi"
|
||||
"github.com/matrix-org/dendrite/clientapi/api"
|
||||
currentstateAPI "github.com/matrix-org/dendrite/currentstateserver/api"
|
||||
eduServerAPI "github.com/matrix-org/dendrite/eduserver/api"
|
||||
"github.com/matrix-org/dendrite/federationapi"
|
||||
|
@ -27,8 +28,6 @@ import (
|
|||
"github.com/matrix-org/dendrite/internal/transactions"
|
||||
"github.com/matrix-org/dendrite/keyserver"
|
||||
"github.com/matrix-org/dendrite/mediaapi"
|
||||
"github.com/matrix-org/dendrite/publicroomsapi/storage"
|
||||
"github.com/matrix-org/dendrite/publicroomsapi/types"
|
||||
roomserverAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||
serverKeyAPI "github.com/matrix-org/dendrite/serverkeyapi/api"
|
||||
"github.com/matrix-org/dendrite/syncapi"
|
||||
|
@ -58,13 +57,8 @@ type Monolith struct {
|
|||
UserAPI userapi.UserInternalAPI
|
||||
StateAPI currentstateAPI.CurrentStateInternalAPI
|
||||
|
||||
// TODO: can we remove this? It's weird that we are required the database
|
||||
// yet every other component can do that on its own. libp2p-demo uses a custom
|
||||
// database though annoyingly.
|
||||
PublicRoomsDB storage.Database
|
||||
|
||||
// Optional
|
||||
ExtPublicRoomsProvider types.ExternalPublicRoomsProvider
|
||||
ExtPublicRoomsProvider api.ExternalPublicRoomsProvider
|
||||
}
|
||||
|
||||
// AddAllPublicRoutes attaches all public paths to the given router
|
||||
|
@ -73,7 +67,7 @@ func (m *Monolith) AddAllPublicRoutes(publicMux *mux.Router) {
|
|||
publicMux, m.Config, m.KafkaProducer, m.DeviceDB, m.AccountDB,
|
||||
m.FedClient, m.RoomserverAPI,
|
||||
m.EDUInternalAPI, m.AppserviceAPI, m.StateAPI, transactions.New(),
|
||||
m.FederationSenderAPI, m.UserAPI,
|
||||
m.FederationSenderAPI, m.UserAPI, m.ExtPublicRoomsProvider,
|
||||
)
|
||||
|
||||
keyserver.AddPublicRoutes(publicMux, m.Config, m.UserAPI)
|
||||
|
@ -83,11 +77,6 @@ func (m *Monolith) AddAllPublicRoutes(publicMux *mux.Router) {
|
|||
m.EDUInternalAPI, m.StateAPI,
|
||||
)
|
||||
mediaapi.AddPublicRoutes(publicMux, m.Config, m.UserAPI, m.Client)
|
||||
/*
|
||||
publicroomsapi.AddPublicRoutes(
|
||||
publicMux, m.Config, m.KafkaConsumer, m.UserAPI, m.PublicRoomsDB, m.RoomserverAPI, m.FedClient,
|
||||
m.ExtPublicRoomsProvider,
|
||||
) */
|
||||
syncapi.AddPublicRoutes(
|
||||
publicMux, m.KafkaConsumer, m.UserAPI, m.RoomserverAPI, m.FedClient, m.Config,
|
||||
)
|
||||
|
|
|
@ -96,7 +96,7 @@ func MakeConfig(configDir, kafkaURI, database, host string, startPort int) (*con
|
|||
cfg.Database.RoomServer = config.DataSource(database)
|
||||
cfg.Database.ServerKey = config.DataSource(database)
|
||||
cfg.Database.SyncAPI = config.DataSource(database)
|
||||
cfg.Database.PublicRoomsAPI = config.DataSource(database)
|
||||
cfg.Database.CurrentState = config.DataSource(database)
|
||||
|
||||
cfg.Listen.ClientAPI = assignAddress()
|
||||
cfg.Listen.AppServiceAPI = assignAddress()
|
||||
|
@ -104,7 +104,7 @@ func MakeConfig(configDir, kafkaURI, database, host string, startPort int) (*con
|
|||
cfg.Listen.MediaAPI = assignAddress()
|
||||
cfg.Listen.RoomServer = assignAddress()
|
||||
cfg.Listen.SyncAPI = assignAddress()
|
||||
cfg.Listen.PublicRoomsAPI = assignAddress()
|
||||
cfg.Listen.CurrentState = assignAddress()
|
||||
cfg.Listen.EDUServer = assignAddress()
|
||||
|
||||
// Bind to the same address as the listen address
|
||||
|
@ -115,7 +115,7 @@ func MakeConfig(configDir, kafkaURI, database, host string, startPort int) (*con
|
|||
cfg.Bind.MediaAPI = cfg.Listen.MediaAPI
|
||||
cfg.Bind.RoomServer = cfg.Listen.RoomServer
|
||||
cfg.Bind.SyncAPI = cfg.Listen.SyncAPI
|
||||
cfg.Bind.PublicRoomsAPI = cfg.Listen.PublicRoomsAPI
|
||||
cfg.Bind.CurrentState = cfg.Listen.CurrentState
|
||||
cfg.Bind.EDUServer = cfg.Listen.EDUServer
|
||||
|
||||
return &cfg, port, nil
|
||||
|
|
|
@ -99,7 +99,6 @@ func StartProxy(bindAddr string, cfg *config.Dendrite) (*exec.Cmd, chan error) {
|
|||
"--sync-api-server-url", "http://" + string(cfg.Listen.SyncAPI),
|
||||
"--client-api-server-url", "http://" + string(cfg.Listen.ClientAPI),
|
||||
"--media-api-server-url", "http://" + string(cfg.Listen.MediaAPI),
|
||||
"--public-rooms-api-server-url", "http://" + string(cfg.Listen.PublicRoomsAPI),
|
||||
"--tls-cert", "server.crt",
|
||||
"--tls-key", "server.key",
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue