Documentation ¶
Index ¶
- Constants
- func ParseFlags(monolith bool) *config.Dendrite
- type BaseDendrite
- func (b *BaseDendrite) AppserviceHTTPClient() appserviceAPI.AppServiceQueryAPI
- func (b *BaseDendrite) Close() error
- func (b *BaseDendrite) CreateAccountsDB() accounts.Database
- func (b *BaseDendrite) CreateClient() *gomatrixserverlib.Client
- func (b *BaseDendrite) CreateFederationClient() *gomatrixserverlib.FederationClient
- func (b *BaseDendrite) EDUServerClient() eduServerAPI.EDUServerInputAPI
- func (b *BaseDendrite) FederationSenderHTTPClient() federationSenderAPI.FederationSenderInternalAPI
- func (b *BaseDendrite) KeyServerHTTPClient() keyserverAPI.KeyInternalAPI
- func (b *BaseDendrite) RoomserverHTTPClient() roomserverAPI.RoomserverInternalAPI
- func (b *BaseDendrite) SetupAndServeHTTP(internalHTTPAddr, externalHTTPAddr config.HTTPAddress, ...)
- func (b *BaseDendrite) SigningKeyServerHTTPClient() skapi.SigningKeyServerAPI
- func (b *BaseDendrite) UserAPIClient() userapi.UserInternalAPI
- func (b *BaseDendrite) WaitForShutdown()
- type Monolith
Constants ¶
const HTTPClientTimeout = time.Second * 30
const HTTPServerTimeout = time.Minute * 5
const NoListener = ""
Variables ¶
This section is empty.
Functions ¶
func ParseFlags ¶
ParseFlags parses the commandline flags and uses them to create a config.
Types ¶
type BaseDendrite ¶
type BaseDendrite struct { *process.ProcessContext PublicClientAPIMux *mux.Router PublicFederationAPIMux *mux.Router PublicKeyAPIMux *mux.Router PublicMediaAPIMux *mux.Router InternalAPIMux *mux.Router UseHTTPAPIs bool Cfg *config.Dendrite Caches *caching.Caches DNSCache *gomatrixserverlib.DNSCache // contains filtered or unexported fields }
BaseDendrite is a base for creating new instances of dendrite. It parses command line flags and config, and exposes methods for creating various resources. All errors are handled by logging then exiting, so all methods should only be used during start up. Must be closed when shutting down.
func NewBaseDendrite ¶
func NewBaseDendrite(cfg *config.Dendrite, componentName string, useHTTPAPIs bool) *BaseDendrite
NewBaseDendrite creates a new instance to be used by a component. The componentName is used for logging purposes, and should be a friendly name of the compontent running, e.g. "SyncAPI"
func (*BaseDendrite) AppserviceHTTPClient ¶
func (b *BaseDendrite) AppserviceHTTPClient() appserviceAPI.AppServiceQueryAPI
AppserviceHTTPClient returns the AppServiceQueryAPI for hitting the appservice component over HTTP.
func (*BaseDendrite) CreateAccountsDB ¶
func (b *BaseDendrite) CreateAccountsDB() accounts.Database
CreateAccountsDB creates a new instance of the accounts database. Should only be called once per component.
func (*BaseDendrite) CreateClient ¶
func (b *BaseDendrite) CreateClient() *gomatrixserverlib.Client
CreateClient creates a new client (normally used for media fetch requests). Should only be called once per component.
func (*BaseDendrite) CreateFederationClient ¶
func (b *BaseDendrite) CreateFederationClient() *gomatrixserverlib.FederationClient
CreateFederationClient creates a new federation client. Should only be called once per component.
func (*BaseDendrite) EDUServerClient ¶
func (b *BaseDendrite) EDUServerClient() eduServerAPI.EDUServerInputAPI
EDUServerClient returns EDUServerInputAPI for hitting the EDU server over HTTP
func (*BaseDendrite) FederationSenderHTTPClient ¶
func (b *BaseDendrite) FederationSenderHTTPClient() federationSenderAPI.FederationSenderInternalAPI
FederationSenderHTTPClient returns FederationSenderInternalAPI for hitting the federation sender over HTTP
func (*BaseDendrite) KeyServerHTTPClient ¶
func (b *BaseDendrite) KeyServerHTTPClient() keyserverAPI.KeyInternalAPI
KeyServerHTTPClient returns KeyInternalAPI for hitting the key server over HTTP
func (*BaseDendrite) RoomserverHTTPClient ¶
func (b *BaseDendrite) RoomserverHTTPClient() roomserverAPI.RoomserverInternalAPI
RoomserverHTTPClient returns RoomserverInternalAPI for hitting the roomserver over HTTP.
func (*BaseDendrite) SetupAndServeHTTP ¶
func (b *BaseDendrite) SetupAndServeHTTP( internalHTTPAddr, externalHTTPAddr config.HTTPAddress, certFile, keyFile *string, )
SetupAndServeHTTP sets up the HTTP server to serve endpoints registered on ApiMux under /api/ and adds a prometheus handler under /metrics. nolint:gocyclo
func (*BaseDendrite) SigningKeyServerHTTPClient ¶
func (b *BaseDendrite) SigningKeyServerHTTPClient() skapi.SigningKeyServerAPI
SigningKeyServerHTTPClient returns SigningKeyServer for hitting the signing key server over HTTP
func (*BaseDendrite) UserAPIClient ¶
func (b *BaseDendrite) UserAPIClient() userapi.UserInternalAPI
UserAPIClient returns UserInternalAPI for hitting the userapi over HTTP.
func (*BaseDendrite) WaitForShutdown ¶ added in v0.3.7
func (b *BaseDendrite) WaitForShutdown()
type Monolith ¶
type Monolith struct { Config *config.Dendrite AccountDB accounts.Database KeyRing *gomatrixserverlib.KeyRing Client *gomatrixserverlib.Client FedClient *gomatrixserverlib.FederationClient AppserviceAPI appserviceAPI.AppServiceQueryAPI EDUInternalAPI eduServerAPI.EDUServerInputAPI FederationSenderAPI federationSenderAPI.FederationSenderInternalAPI RoomserverAPI roomserverAPI.RoomserverInternalAPI ServerKeyAPI serverKeyAPI.SigningKeyServerAPI UserAPI userapi.UserInternalAPI KeyAPI keyAPI.KeyInternalAPI // Optional ExtPublicRoomsProvider api.ExtraPublicRoomsProvider }
Monolith represents an instantiation of all dependencies required to build all components of Dendrite, for use in monolith mode.
func (*Monolith) AddAllPublicRoutes ¶
func (m *Monolith) AddAllPublicRoutes(process *process.ProcessContext, csMux, ssMux, keyMux, mediaMux *mux.Router)
AddAllPublicRoutes attaches all public paths to the given router
Directories ¶
Path | Synopsis |
---|---|
Package mscs implements Matrix Spec Changes from https://github.com/matrix-org/matrix-doc
|
Package mscs implements Matrix Spec Changes from https://github.com/matrix-org/matrix-doc |
msc2836
Package msc2836 'Threading' implements https://github.com/matrix-org/matrix-doc/pull/2836
|
Package msc2836 'Threading' implements https://github.com/matrix-org/matrix-doc/pull/2836 |
msc2946
Package msc2946 'Spaces Summary' implements https://github.com/matrix-org/matrix-doc/pull/2946
|
Package msc2946 'Spaces Summary' implements https://github.com/matrix-org/matrix-doc/pull/2946 |