wire-subsystems-0.1.0
Safe HaskellSafe-Inferred
LanguageGHC2021

Wire.FederationAPIAccess

Synopsis

Documentation

data FederationAPIAccess (fedM :: Component -> Type -> Type) m a where Source #

Constructors

RunFederatedEither :: KnownComponent c => Remote x -> fedM c a -> FederationAPIAccess fedM m (Either FederationError a) 
RunFederatedConcurrently :: forall (c :: Component) f a m x fedM. (KnownComponent c, Foldable f) => f (Remote x) -> (Remote x -> fedM c a) -> FederationAPIAccess fedM m [Either (Remote x, FederationError) (Remote a)] 
RunFederatedBucketed :: forall (c :: Component) f a m x fedM. (KnownComponent c, Foldable f, Functor f) => f (Remote x) -> (Remote [x] -> fedM c a) -> FederationAPIAccess fedM m [Either (Remote [x], FederationError) (Remote a)]

An action similar to RunFederatedConcurrently, but the input is bucketed by domain before the RPCs are sent to the remote backends.

IsFederationConfigured :: FederationAPIAccess fedM m Bool 

runFederatedBucketed :: forall fedM r c f x a. (Member (FederationAPIAccess fedM) r, KnownComponent c, Foldable f, Functor f) => f (Remote x) -> (Remote [x] -> fedM c a) -> Sem r [Either (Remote [x], FederationError) (Remote a)] Source #

An action similar to RunFederatedConcurrently, but the input is bucketed by domain before the RPCs are sent to the remote backends.

runFederatedConcurrently :: forall fedM r c f x a. (Member (FederationAPIAccess fedM) r, KnownComponent c, Foldable f) => f (Remote x) -> (Remote x -> fedM c a) -> Sem r [Either (Remote x, FederationError) (Remote a)] Source #

runFederatedEither :: forall fedM r c x a. (Member (FederationAPIAccess fedM) r, KnownComponent c) => Remote x -> fedM c a -> Sem r (Either FederationError a) Source #

runFederated :: forall c fedM x a r. (Member (FederationAPIAccess fedM) r, Member (Error FederationError) r, KnownComponent c) => Remote x -> fedM c a -> Sem r a Source #