Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- newtype Server tx m = Server {
- sendOutput :: ServerOutput tx -> m ()
- type ServerCallback tx m = ClientInput tx -> m ()
- type ServerComponent tx m a = ServerCallback tx m -> (Server tx m -> m a) -> m a
- data APIServerConfig = APIServerConfig {
- host :: IP
- port :: PortNumber
- tlsCertPath :: Maybe FilePath
- tlsKeyPath :: Maybe FilePath
- withAPIServer :: forall tx. IsChainState tx => APIServerConfig -> Party -> PersistenceIncremental (TimedServerOutput tx) IO -> Tracer IO APIServerLog -> Chain tx IO -> PParams LedgerEra -> ServerComponent tx IO ()
- data RunServerException = RunServerException {
- ioException :: IOException
- host :: IP
- port :: PortNumber
- type NotifyServerRunning = IO ()
- type WaitForServer = IO ()
- setupServerNotification :: IO (NotifyServerRunning, WaitForServer)
Documentation
Handle to provide a means for sending server outputs to clients.
Server | |
|
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.
data APIServerConfig Source #
APIServerConfig | |
|
withAPIServer :: forall tx. IsChainState tx => APIServerConfig -> Party -> PersistenceIncremental (TimedServerOutput tx) IO -> Tracer IO APIServerLog -> Chain tx IO -> PParams LedgerEra -> ServerComponent tx IO () Source #
data RunServerException Source #
An IOException
with more IP
and PortNumber
added as context.
RunServerException | |
|
Instances
Exception RunServerException Source # | |
Defined in Hydra.API.Server | |
Show RunServerException Source # | |
Defined in Hydra.API.Server |
type NotifyServerRunning = IO () Source #
type WaitForServer = IO () Source #
setupServerNotification :: IO (NotifyServerRunning, WaitForServer) Source #
Setup notification and waiter to ensure that something only runs after the server is actually listening.