servant-subscriber-0.6.0.0: When REST is not enough ...

Safe HaskellNone
LanguageHaskell2010

Servant.Subscriber.Client

Synopsis

Documentation

data Client api #

Constructors

Client 

fromWebSocket :: Subscriber api -> IORef (IO ()) -> Connection -> STM (Client api) #

run :: (MonadLogger m, MonadBaseControl IO m, MonadIO m, Backend backend) => backend -> Client api -> m () #

removeRequest :: Client api -> HttpRequest -> STM () #

Remove a Request, also unsubscribes from subscriber and deletes our monitor if it was the last Request for the given path.

unsubscribeMonitor :: Subscriber api -> StatusMonitor -> STM () #

Does not remove the monitor - use removeRequest if you want this!

handleRequests :: Backend backend => backend -> Client api -> IO () #

runMonitor :: Backend backend => backend -> Client api -> IO () #

handleUpdates :: Backend backend => backend -> Client api -> (HttpRequest, ResourceStatus) -> IO () #

handleModified :: Backend backend => backend -> Client api -> HttpRequest -> IO () #

getServerResponse :: Backend backend => backend -> HttpRequest -> (Response -> IO ()) -> IO () #