summary refs log tree commit diff
path: root/synapse/server.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-11-16 14:15:50 +0000
committerErik Johnston <erik@matrix.org>2016-11-16 14:47:52 +0000
commit847d5db1d1aa30fd6a8166e36fe04e6d94533521 (patch)
tree73fcd72f44b37cbfd34c2821eacc98d18013abf4 /synapse/server.py
parentMove logic into transaction_queue (diff)
downloadsynapse-847d5db1d1aa30fd6a8166e36fe04e6d94533521.tar.xz
Add transaction queue and transport layer to DI
Diffstat (limited to 'synapse/server.py')
-rw-r--r--synapse/server.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/synapse/server.py b/synapse/server.py
index 374124a147..faab617b4f 100644
--- a/synapse/server.py
+++ b/synapse/server.py
@@ -32,6 +32,8 @@ from synapse.appservice.scheduler import ApplicationServiceScheduler
 from synapse.crypto.keyring import Keyring
 from synapse.events.builder import EventBuilderFactory
 from synapse.federation import initialize_http_replication
+from synapse.federation.transport.client import TransportLayerClient
+from synapse.federation.transaction_queue import TransactionQueue
 from synapse.handlers import Handlers
 from synapse.handlers.appservice import ApplicationServicesHandler
 from synapse.handlers.auth import AuthHandler
@@ -124,6 +126,8 @@ class HomeServer(object):
         'http_client_context_factory',
         'simple_http_client',
         'media_repository',
+        'federation_transport_client',
+        'federation_sender',
     ]
 
     def __init__(self, hostname, **kwargs):
@@ -265,6 +269,12 @@ class HomeServer(object):
     def build_media_repository(self):
         return MediaRepository(self)
 
+    def build_federation_transport_client(self):
+        return TransportLayerClient(self)
+
+    def build_federation_sender(self):
+        return TransactionQueue(self)
+
     def remove_pusher(self, app_id, push_key, user_id):
         return self.get_pusherpool().remove_pusher(app_id, push_key, user_id)