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

#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 a

ok response

#continueHibernate Source

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

ok, hibernate response

#stop Source

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

stop response

#CowboyLoopBehaviour Source

type CowboyLoopBehaviour = Behaviour "cowboy_loop"

#cowboyLoopBehaviour Source

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 Source

#TerminateReason Source

data TerminateReason

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

Constructors

#RawReason Source

data RawReason :: Type

#CrashType Source

data CrashType

Constructors