aboutsummaryrefslogtreecommitdiff
path: root/keyserver/keyserver.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-08-20 17:03:07 +0100
committerGitHub <noreply@github.com>2020-08-20 17:03:07 +0100
commit6d6bb7513710db1009c474eff031434916feda1b (patch)
tree62eb40ba6944580a7cf6da1541d7070ad65bd362 /keyserver/keyserver.go
parent068a3d3c9f9be3473b68e3a13912182caf1c7117 (diff)
Add FederationClient interface to federationsender (#1284)
* Add FederationClient interface to federationsender - Use a shim struct in HTTP mode to keep the same API as `FederationClient`. - Use `federationsender` instead of `FederationClient` in `keyserver`. * Pointers not values * Review comments * Fix unit tests * Rejig backoff * Unbreak test * Remove debug logs * Review comments and linting
Diffstat (limited to 'keyserver/keyserver.go')
-rw-r--r--keyserver/keyserver.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/keyserver/keyserver.go b/keyserver/keyserver.go
index 04136938..2e561363 100644
--- a/keyserver/keyserver.go
+++ b/keyserver/keyserver.go
@@ -17,13 +17,13 @@ package keyserver
import (
"github.com/Shopify/sarama"
"github.com/gorilla/mux"
+ fedsenderapi "github.com/matrix-org/dendrite/federationsender/api"
"github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/keyserver/api"
"github.com/matrix-org/dendrite/keyserver/internal"
"github.com/matrix-org/dendrite/keyserver/inthttp"
"github.com/matrix-org/dendrite/keyserver/producers"
"github.com/matrix-org/dendrite/keyserver/storage"
- "github.com/matrix-org/gomatrixserverlib"
"github.com/sirupsen/logrus"
)
@@ -36,7 +36,7 @@ func AddInternalRoutes(router *mux.Router, intAPI api.KeyInternalAPI) {
// NewInternalAPI returns a concerete implementation of the internal API. Callers
// can call functions directly on the returned API or via an HTTP interface using AddInternalRoutes.
func NewInternalAPI(
- cfg *config.KeyServer, fedClient *gomatrixserverlib.FederationClient, producer sarama.SyncProducer,
+ cfg *config.KeyServer, fedClient fedsenderapi.FederationClient, producer sarama.SyncProducer,
) api.KeyInternalAPI {
db, err := storage.NewDatabase(&cfg.Database)
if err != nil {