hydra-node-0.20.0: The Hydra node
Safe HaskellSafe-Inferred
LanguageGHC2021

Hydra.API.Server

Synopsis

Documentation

newtype Server tx m Source #

Handle to provide a means for sending server outputs to clients.

Constructors

Server 

Fields

type ServerCallback tx m = ClientInput tx -> m () Source #

Callback for receiving client inputs.

type ServerComponent tx m a = ServerCallback tx m -> (Server tx m -> m a) -> m a Source #

A type tying both receiving input and sending output into a Component.

withAPIServer :: forall tx. IsChainState tx => APIServerConfig -> Environment -> Party -> PersistenceIncremental (TimedServerOutput tx) IO -> Tracer IO APIServerLog -> Chain tx IO -> PParams LedgerEra -> ServerComponent tx IO () Source #

setupServerNotification :: IO (NotifyServerRunning, WaitForServer) Source #

Setup notification and waiter to ensure that something only runs after the server is actually listening.