sparrow-0.0.2.0: Unified streaming dependency management for web apps

Safe HaskellNone
LanguageHaskell2010

Web.Dependencies.Sparrow.Server

Synopsis

Documentation

unpackServer Source #

Arguments

:: MonadIO m 
=> MonadBaseControl IO m stM 
=> Extractable stM 
=> FromJSON initIn 
=> ToJSON initOut 
=> FromJSON deltaIn 
=> ToJSON deltaOut 
=> Foldable f 
=> Topic

Name of Dependency

-> Server m f initIn initOut deltaIn deltaOut

Handler for all clients

-> SparrowServerT http f m (MiddlewareT m) 

Called per-connection

match Source #

Arguments

:: Monad m 
=> Match xs' xs childHttp resultHttp 
=> UrlChunks xs

Should match the dependency name

-> childHttp

MiddlewareT, or a function to one

-> SparrowServerT resultHttp f m () 

Match an individual dependency

type MatchGroup xs' xs childHttp resultHttp = ExtrudeSoundly xs' xs childHttp resultHttp Source #

matchGroup Source #

Arguments

:: Monad m 
=> MatchGroup xs' xs childHttp resultHttp 
=> UrlChunks xs

Common Topic prefix

-> SparrowServerT childHttp f m ()

Set of handlers

-> SparrowServerT resultHttp f m () 

Group together a set of dependencies

serveDependencies Source #

Arguments

:: MonadBaseControl IO m 
=> MonadBaseControl IO m stM 
=> Extractable stM 
=> MonadIO m 
=> MonadCatch m 
=> Foldable f 
=> Alternative f 
=> SparrowServerT (MiddlewareT m) f m a

Dependencies

-> m (RouterT (MiddlewareT m) sec m ()) 

Host dependencies and websocket