polysemy-account-api-0.2.0.0: Account management with Servant and Polysemy
Safe HaskellSafe-Inferred
LanguageHaskell2010

Polysemy.Account.Api.NativeContext

Description

 
Synopsis

Documentation

data ServerReady Source #

A dummy value used to indicate that the server has fully started up, using Sync.

Constructors

ServerReady 

Instances

Instances details
Show ServerReady Source # 
Instance details

Defined in Polysemy.Account.Api.NativeContext

Eq ServerReady Source # 
Instance details

Defined in Polysemy.Account.Api.NativeContext

runServerSem :: forall (api :: Type) context r a. HasServer api context => HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters => Members [Log, Embed IO, Final IO] r => ServerT api (Sem (Stop ServerError ': r)) -> Context context -> (Application -> IO a) -> Sem r a Source #

Run a Servant server using a callback in Final IO, sending logs to Log.

runServer :: forall (api :: Type) context r. HasServer api context => HasContextEntry (context .++ DefaultErrorFormatters) ErrorFormatters => Members [Sync ServerReady, Log, Interrupt, Final IO] r => ServerT api (Sem (Stop ServerError ': r)) -> Context context -> Port -> Sem r () Source #

Run a Servant server using Warp in Final IO, sending logs to Log, registering the shutdown handler with Interrupt.