Module

Erl.Cowboy.Handlers.Loop

Types and handlers for a cowboy_loop loop handler callback module.

#InitResult

data InitResult t0

#InitHandler

#initResult

initResult :: forall a. a -> Req -> InitResult a

#hibernate

hibernate :: forall a. a -> Req -> InitResult a

#InfoResult

data InfoResult t0

#InfoHandler

type InfoHandler a s = EffectFn3 a Req s (InfoResult s)

#continue

continue :: forall a. a -> Req -> InfoResult a

ok response

#continueHibernate

continueHibernate :: forall a. a -> Req -> InfoResult a

ok, hibernate response

#stop

stop :: forall a. a -> Req -> InfoResult a

stop response

#CowboyLoopBehaviour

type CowboyLoopBehaviour = Behaviour "cowboy_loop"

#cowboyLoopBehaviour

cowboyLoopBehaviour :: forall a s. { info :: InfoHandler a s, init :: InitHandler a s } -> CowboyLoopBehaviour

A cowboy_loop behaviour. A terminate callback is optional.

Re-exports from Erl.Cowboy.Handlers.Common

#TerminateResult

#TerminateReason

data TerminateReason

Reason for a crash. The Reason :: any() is currently discarded

Constructors

#RawReason

#CrashType

data CrashType

Constructors

Modules