wire-subsystems-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.FederationConfigStore.Cassandra

Synopsis

Documentation

interpretFederationDomainConfig :: forall r a. Member (Embed IO) r => ClientState -> Maybe FederationStrategy -> Map Domain FederationDomainConfig -> Sem (FederationConfigStore ': r) a -> Sem r a Source #

Interpreter for getting the federation config from the database and the config file. The config file is injected into the interpreter and has precedence over the database. The config file is static and can only be changed by restarting the service. If a domain is configured in the config file, it is not allowed to add it to the database. If a domain is configured in the config file, it is not allowed to update it in the database. If a domain is configured in the config file, it is not allowed to add a team restriction to it in the database. In the future the config file will be removed and the database will be the only source of truth.

remotesMapFromCfgFile :: [FederationDomainConfig] -> Map Domain FederationDomainConfig Source #

Compile config file list into a map indexed by domains. Use this to make sure the config file is consistent (ie., no two entries for the same domain). This is called during initialization of the interpreter and the service will fail if the config is not consistent.