aboutsummaryrefslogtreecommitdiff
path: root/keyserver/keyserver.go
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver/keyserver.go')
-rw-r--r--keyserver/keyserver.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/keyserver/keyserver.go b/keyserver/keyserver.go
index 78420db1..6c54d2a0 100644
--- a/keyserver/keyserver.go
+++ b/keyserver/keyserver.go
@@ -15,10 +15,10 @@
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/internal/setup/kafka"
"github.com/matrix-org/dendrite/keyserver/api"
"github.com/matrix-org/dendrite/keyserver/internal"
"github.com/matrix-org/dendrite/keyserver/inthttp"
@@ -36,8 +36,10 @@ 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 fedsenderapi.FederationClient, producer sarama.SyncProducer,
+ cfg *config.KeyServer, fedClient fedsenderapi.FederationClient,
) api.KeyInternalAPI {
+ _, producer := kafka.SetupConsumerProducer(&cfg.Matrix.Kafka)
+
db, err := storage.NewDatabase(&cfg.Database)
if err != nil {
logrus.WithError(err).Panicf("failed to connect to key server database")