diff options
author | devonh <devon.dmytro@gmail.com> | 2023-04-24 16:23:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-24 16:23:25 +0000 |
commit | ed19efc5d751446a57727c0880437d95be26ba9d (patch) | |
tree | 9c779c3d5df6b06afa0315e24e23b7a650a2a4b0 /cmd | |
parent | 4679098a6415ea8bfb7728ddafa587780849c059 (diff) |
Move fedclient interface over to gmsl (#3061)
Companion PR: https://github.com/matrix-org/gomatrixserverlib/pull/366
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/dendrite-demo-pinecone/conn/client.go | 2 | ||||
-rw-r--r-- | cmd/dendrite-demo-pinecone/rooms/rooms.go | 6 | ||||
-rw-r--r-- | cmd/dendrite-demo-pinecone/users/users.go | 6 | ||||
-rw-r--r-- | cmd/dendrite-demo-yggdrasil/yggconn/client.go | 2 | ||||
-rw-r--r-- | cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/cmd/dendrite-demo-pinecone/conn/client.go b/cmd/dendrite-demo-pinecone/conn/client.go index 4571de15..5d1417dd 100644 --- a/cmd/dendrite-demo-pinecone/conn/client.go +++ b/cmd/dendrite-demo-pinecone/conn/client.go @@ -99,7 +99,7 @@ func CreateClient( func CreateFederationClient( cfg *config.Dendrite, s *pineconeSessions.Sessions, -) *fclient.FederationClient { +) fclient.FederationClient { return fclient.NewFederationClient( cfg.Global.SigningIdentities(), fclient.WithTransport(createTransport(s)), diff --git a/cmd/dendrite-demo-pinecone/rooms/rooms.go b/cmd/dendrite-demo-pinecone/rooms/rooms.go index 73423ef6..57282a00 100644 --- a/cmd/dendrite-demo-pinecone/rooms/rooms.go +++ b/cmd/dendrite-demo-pinecone/rooms/rooms.go @@ -33,14 +33,14 @@ type PineconeRoomProvider struct { r *pineconeRouter.Router s *pineconeSessions.Sessions fedSender api.FederationInternalAPI - fedClient *fclient.FederationClient + fedClient fclient.FederationClient } func NewPineconeRoomProvider( r *pineconeRouter.Router, s *pineconeSessions.Sessions, fedSender api.FederationInternalAPI, - fedClient *fclient.FederationClient, + fedClient fclient.FederationClient, ) *PineconeRoomProvider { p := &PineconeRoomProvider{ r: r, @@ -68,7 +68,7 @@ func (p *PineconeRoomProvider) Rooms() []fclient.PublicRoom { // bulkFetchPublicRoomsFromServers fetches public rooms from the list of homeservers. // Returns a list of public rooms. func bulkFetchPublicRoomsFromServers( - ctx context.Context, fedClient *fclient.FederationClient, + ctx context.Context, fedClient fclient.FederationClient, origin spec.ServerName, homeservers map[spec.ServerName]struct{}, ) (publicRooms []fclient.PublicRoom) { diff --git a/cmd/dendrite-demo-pinecone/users/users.go b/cmd/dendrite-demo-pinecone/users/users.go index 9c844ab6..079df328 100644 --- a/cmd/dendrite-demo-pinecone/users/users.go +++ b/cmd/dendrite-demo-pinecone/users/users.go @@ -39,7 +39,7 @@ type PineconeUserProvider struct { r *pineconeRouter.Router s *pineconeSessions.Sessions userAPI userapi.QuerySearchProfilesAPI - fedClient *fclient.FederationClient + fedClient fclient.FederationClient } const PublicURL = "/_matrix/p2p/profiles" @@ -48,7 +48,7 @@ func NewPineconeUserProvider( r *pineconeRouter.Router, s *pineconeSessions.Sessions, userAPI userapi.QuerySearchProfilesAPI, - fedClient *fclient.FederationClient, + fedClient fclient.FederationClient, ) *PineconeUserProvider { p := &PineconeUserProvider{ r: r, @@ -95,7 +95,7 @@ func (p *PineconeUserProvider) QuerySearchProfiles(ctx context.Context, req *use // Returns a list of user profiles. func bulkFetchUserDirectoriesFromServers( ctx context.Context, req *userapi.QuerySearchProfilesRequest, - fedClient *fclient.FederationClient, + fedClient fclient.FederationClient, homeservers map[spec.ServerName]struct{}, ) (profiles []authtypes.Profile) { jsonBody, err := json.Marshal(req) diff --git a/cmd/dendrite-demo-yggdrasil/yggconn/client.go b/cmd/dendrite-demo-yggdrasil/yggconn/client.go index c25acf2e..e1dc0f66 100644 --- a/cmd/dendrite-demo-yggdrasil/yggconn/client.go +++ b/cmd/dendrite-demo-yggdrasil/yggconn/client.go @@ -38,7 +38,7 @@ func (n *Node) CreateClient() *fclient.Client { func (n *Node) CreateFederationClient( cfg *config.Dendrite, -) *fclient.FederationClient { +) fclient.FederationClient { tr := &http.Transport{} tr.RegisterProtocol( "matrix", &yggroundtripper{ diff --git a/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go b/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go index f838dea0..7ebecb65 100644 --- a/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go +++ b/cmd/dendrite-demo-yggdrasil/yggrooms/yggrooms.go @@ -29,11 +29,11 @@ import ( type YggdrasilRoomProvider struct { node *yggconn.Node fedSender api.FederationInternalAPI - fedClient *fclient.FederationClient + fedClient fclient.FederationClient } func NewYggdrasilRoomProvider( - node *yggconn.Node, fedSender api.FederationInternalAPI, fedClient *fclient.FederationClient, + node *yggconn.Node, fedSender api.FederationInternalAPI, fedClient fclient.FederationClient, ) *YggdrasilRoomProvider { p := &YggdrasilRoomProvider{ node: node, @@ -54,7 +54,7 @@ func (p *YggdrasilRoomProvider) Rooms() []fclient.PublicRoom { // bulkFetchPublicRoomsFromServers fetches public rooms from the list of homeservers. // Returns a list of public rooms. func bulkFetchPublicRoomsFromServers( - ctx context.Context, fedClient *fclient.FederationClient, + ctx context.Context, fedClient fclient.FederationClient, origin spec.ServerName, homeservers []spec.ServerName, ) (publicRooms []fclient.PublicRoom) { |