Skip to content

registry

Structs


firma_sidecar::connector::registry::ConnectorRegistry

Section titled “firma_sidecar::connector::registry::ConnectorRegistry”

Struct

Host-keyed registry of [Connector] instances.

Every request goes through select: the target host maps to a registered override, or, when no override exists, to the default connector registered at construction time.

The registry is built once at startup and cloned as Arc into the RequestHandler. It is effectively immutable on the hot path — all mutation happens before the handler begins serving traffic.

Methods:

  • fn new(default: Arc<dyn Connector>) -> Self - Creates a new registry with the given default connector and
  • fn register_host(self: & mut Self, host: String, connector: Arc<dyn Connector>) - Registers a connector as the override for host.
  • fn select(self: &Self, host: &str) -> Arc<dyn Connector> - Returns the connector that should handle host.