0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-21 09:21:45 +01:00
9 Bridges
Jason Volk edited this page 2023-02-16 11:11:47 -08:00

Bridge Registration

  1. Follow instructions for setting up your bridge. This should produce a registration.yaml file.

    • Add the prefix "bridge_" to the as_token. Example: as_token: bridge_1m9jt3xt6qdb4...

    • The bridge id and the sender_localpart have to match at this time.

    The bridge user and room will be created based on the id automatically (e.g. !id:localhost). It is also okay if these already exist.

  2. Convert the registration.yaml to registration.json using a yaml2json converter such as apt-get install reserialize or a website.

    reserialize yaml2json registration.yaml > registration.json
    
  3. Open the console to enter the following command:

    bridge set /path/to/registration.json
    

    If the bridge has already been registered before then the prior configuration will be overwritten.

    Registrations and/or updates will take effect immediately without restarting the server or reloading m_bridge

Commands

  • bridge: List all of the registered bridges by their id.

  • bridge <id>: Display the registration of a specific bridge by id.

  • bridge add <path>: Register a new bridge based on the registration file. It is an error if a bridge with the same id is already registered. Upon success, the server will connect to the bridge and send events.

  • bridge set <path>: Create or update the registration of a bridge based on a registration file. The prior registration will be overwritten; the server will reconnect to the bridge based on the new registration. When there is no change this command is a no-op.

  • bridge del <id>: Redact the registration of a bridge by id. The server will disconnect from the bridge.

Configuration

Configuration items can be set using the conf set <item> <value> command or as environment variables by replacing the dots with underscores.

  • ircd.m.bridge.enable: Set to false to disable the bridge subsystem on startup.

  • ircd.m.bridge.backoff: The timeout in seconds for the server to retry its connection to a bridge.

  • ircd.m.bridge.txn.timeout: The timeout in seconds for the server to wait for the bridge to process each pushed transaction.

  • ircd.m.bridge.txn.bufsize: The size of the transaction buffer. When the server has to synchronize a large number of events to the bridge it will limit each transaction to this size.