stm-firehose-0.1.2: Conduits and STM operations for fire hoses.

Safe HaskellNone

Data.Conduit.Network.Firehose

Synopsis

Documentation

firehoseAppSource

Arguments

:: Int

Buffer size for the fire hose threads

-> (Request -> a -> Bool)

A filtering function for fire hose messages. Only messages that match this functions will be passed. The request can be used to build the filter.

-> (a -> Builder)

The serialization function

-> Firehose a 
-> Application 

A firehose application, suitable for use in a wai-compatible server.

firehoseConduitSource

Arguments

:: (Monad m, MonadIO m) 
=> Int

Port to listen on

-> Int

Buffer size for the fire hose threads

-> (Request -> a -> Bool)

A filtering function for fire hose messages. Only messages that match this functions will be passed. The request can be used to build the filter.

-> (a -> Builder)

The serialization function

-> IO (Conduit a m a) 

A fire hose conduit creator, that can be inserted in your conduits as firehose entry points. Will run Warp on the specified port.