Module
Erl.Cowboy.Handlers.Loop
- Package
- erl-cowboy
- Repository
- purerl/purescript-erl-cowboy
Types and handlers for a cowboy_loop loop handler callback module.
#InitResult Source
data InitResult :: Type -> Type#InitHandler Source
type InitHandler c s = EffectFn2 Req c (InitResult s)#initResult Source
initResult :: forall a. a -> Req -> InitResult a#hibernate Source
hibernate :: forall a. a -> Req -> InitResult a#InfoResult Source
data InfoResult :: Type -> Type#InfoHandler Source
type InfoHandler a s = EffectFn3 a Req s (InfoResult s)#continue Source
continue :: forall a. a -> Req -> InfoResult aok response
#continueHibernate Source
continueHibernate :: forall a. a -> Req -> InfoResult aok, hibernate response
#stop Source
stop :: forall a. a -> Req -> InfoResult astop response
#TerminateHandler Source
type TerminateHandler s = EffectFn3 TerminateReason Req s TerminateResult#CowboyLoopBehaviour Source
type CowboyLoopBehaviour = Behaviour "cowboy_loop"#cowboyLoopBehaviour Source
cowboyLoopBehaviour :: forall a s. { info :: InfoHandler a s, init :: InitHandler a s } -> CowboyLoopBehaviourA cowboy_loop behaviour. A terminate callback is optional.
Re-exports from Erl.Cowboy.Handlers.Common
#TerminateResult Source
data TerminateResult :: Type