Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Web.Minion.Response.ServerEvent
Synopsis
- newtype EventSource a = EventSource (IO a)
- class ToServerEvent a where
- toServerEvent :: a -> ServerEvent
- data ServerEvent
- = ServerEvent { }
- | CommentEvent { }
- | RetryEvent {
- eventRetry :: Int
- | CloseEvent
Documentation
newtype EventSource a Source #
Constructors
EventSource (IO a) |
Instances
CanRespond (EventSource a :: Type) Source # | |
Defined in Web.Minion.Response.ServerEvent Methods canRespond :: [ByteString] -> Bool # | |
(Monad m, ToServerEvent a) => ToResponse m (EventSource a) Source # | |
Defined in Web.Minion.Response.ServerEvent Methods toResponse :: [ByteString] -> EventSource a -> m Response # |
class ToServerEvent a where Source #
Methods
toServerEvent :: a -> ServerEvent Source #
Instances
ToServerEvent ServerEvent Source # | |
Defined in Web.Minion.Response.ServerEvent Methods |
data ServerEvent #
Type representing a communication over an event stream. This can be an actual event, a comment, a modification to the retry timer, or a special "close" event indicating the server should close the connection.
Constructors
ServerEvent | |
CommentEvent | |
Fields | |
RetryEvent | |
Fields
| |
CloseEvent |
Instances
ToServerEvent ServerEvent Source # | |
Defined in Web.Minion.Response.ServerEvent Methods |