Move fedclient interface over to gmsl (#3061)

Companion PR: https://github.com/matrix-org/gomatrixserverlib/pull/366
This commit is contained in:
devonh 2023-04-24 16:23:25 +00:00 committed by GitHub
parent 4679098a64
commit ed19efc5d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
34 changed files with 53 additions and 120 deletions

View file

@ -17,6 +17,7 @@ import (
"github.com/matrix-org/dendrite/setup/config"
"github.com/matrix-org/gomatrix"
"github.com/matrix-org/gomatrixserverlib"
"github.com/matrix-org/gomatrixserverlib/fclient"
"github.com/matrix-org/gomatrixserverlib/spec"
"github.com/sirupsen/logrus"
)
@ -27,7 +28,7 @@ type FederationInternalAPI struct {
cfg *config.FederationAPI
statistics *statistics.Statistics
rsAPI roomserverAPI.FederationRoomserverAPI
federation api.FederationClient
federation fclient.FederationClient
keyRing *gomatrixserverlib.KeyRing
queues *queue.OutgoingQueues
joins sync.Map // joins currently in progress
@ -36,7 +37,7 @@ type FederationInternalAPI struct {
func NewFederationInternalAPI(
db storage.Database, cfg *config.FederationAPI,
rsAPI roomserverAPI.FederationRoomserverAPI,
federation api.FederationClient,
federation fclient.FederationClient,
statistics *statistics.Statistics,
caches *caching.Caches,
queues *queue.OutgoingQueues,

View file

@ -773,7 +773,7 @@ func setDefaultRoomVersionFromJoinEvent(
// FederatedAuthProvider is an auth chain provider which fetches events from the server provided
func federatedAuthProvider(
ctx context.Context, federation api.FederationClient,
ctx context.Context, federation fclient.FederationClient,
keyRing gomatrixserverlib.JSONVerifier, origin, server spec.ServerName,
) gomatrixserverlib.AuthChainProvider {
// A list of events that we have retried, if they were not included in

View file

@ -30,7 +30,7 @@ import (
)
type testFedClient struct {
api.FederationClient
fclient.FederationClient
queryKeysCalled bool
claimKeysCalled bool
shouldFail bool