Safe Haskell | None |
---|---|
Language | Haskell2010 |
HTTP API of the Daemon, Internal
Synopsis
- type Api = "event" :> (Get '[JSON] (Seq Event) :<|> (ReqBody '[JSON] Event :> PostCreated '[JSON] ()))
- receiveEvent :: Members [Events resource Event, Reader InstanceName] r => Event -> Sem r ()
- server :: Members [Events resource Event, AtomicState (Seq Event), Reader InstanceName] r => ServerT Api (Sem r)
- defaultPort :: Int
- serve :: Members [Events resource Event, Reader NetConfig] r => Members [AtomicState (Seq Event), Reader InstanceName, Sync ServerReady, Log, Interrupt, Final IO] r => Sem r ()
Documentation
type Api = "event" :> (Get '[JSON] (Seq Event) :<|> (ReqBody '[JSON] Event :> PostCreated '[JSON] ())) Source #
The Servant API of the daemon, providing endpoints for getting all events and creating one.
receiveEvent :: Members [Events resource Event, Reader InstanceName] r => Event -> Sem r () Source #
Publish a received event unless it was sent by the network agent of this instance.
server :: Members [Events resource Event, AtomicState (Seq Event), Reader InstanceName] r => ServerT Api (Sem r) Source #
The server implementation.
defaultPort :: Int Source #
The default port, 9500.