mirror of
https://github.com/matrix-org/dendrite.git
synced 2024-11-27 00:31:55 -06:00
1e71fd645e
* Initial persistence of blacklists * Move statistics folder * Make MaxFederationRetries configurable * Set lower failure thresholds for Yggdrasil demos * Still write events into database for blacklisted hosts (they can be tidied up later) * Review comments
41 lines
1.2 KiB
Go
41 lines
1.2 KiB
Go
package internal
|
|
|
|
import (
|
|
"github.com/matrix-org/dendrite/federationsender/queue"
|
|
"github.com/matrix-org/dendrite/federationsender/statistics"
|
|
"github.com/matrix-org/dendrite/federationsender/storage"
|
|
"github.com/matrix-org/dendrite/internal/config"
|
|
"github.com/matrix-org/dendrite/roomserver/api"
|
|
"github.com/matrix-org/gomatrixserverlib"
|
|
)
|
|
|
|
// FederationSenderInternalAPI is an implementation of api.FederationSenderInternalAPI
|
|
type FederationSenderInternalAPI struct {
|
|
db storage.Database
|
|
cfg *config.Dendrite
|
|
statistics *statistics.Statistics
|
|
rsAPI api.RoomserverInternalAPI
|
|
federation *gomatrixserverlib.FederationClient
|
|
keyRing *gomatrixserverlib.KeyRing
|
|
queues *queue.OutgoingQueues
|
|
}
|
|
|
|
func NewFederationSenderInternalAPI(
|
|
db storage.Database, cfg *config.Dendrite,
|
|
rsAPI api.RoomserverInternalAPI,
|
|
federation *gomatrixserverlib.FederationClient,
|
|
keyRing *gomatrixserverlib.KeyRing,
|
|
statistics *statistics.Statistics,
|
|
queues *queue.OutgoingQueues,
|
|
) *FederationSenderInternalAPI {
|
|
return &FederationSenderInternalAPI{
|
|
db: db,
|
|
cfg: cfg,
|
|
rsAPI: rsAPI,
|
|
federation: federation,
|
|
keyRing: keyRing,
|
|
statistics: statistics,
|
|
queues: queues,
|
|
}
|
|
}
|