def dispatch

bend-kit-camber@0.15.0.1 · camber.bend:959

import bend-kit-camber@0.15.0.1/camber.bend as Camber
import Base
import bend-kit-http@0.38.1.1/http.bend as Http
import bend-kit-camber@0.15.0.1/notices.bend as Notices
import bend-kit-time@0.3.0.0/time.bend as Time

959# The same application pipeline is used live; only this boundary emits direct notices.
960def dispatch(~A: Data, ~S: Type, ~K: Data, ~E: Data, ~H: Data, ~N: Data,
961  ~before_hook: H -> S -> K -> Metadata -> IO(Step<S, E>),
962  ~after_hook: H -> S -> K -> Http.Res -> IO(S & Result<&2, &1, Error<E>, Http.Res>),
963  ~run: A -> S -> K -> Match<Policy<H>> -> Http.Req -> IO(S & Result<&2, &1, Error<E>, Http.Res>),
964  ~mapper: S -> K -> Error<E> -> IO(S & Result<&2, &1, Error<E>, Http.Res>),
965  ~notify: N -> Policy<H> -> Notices.Notice -> IO(Result<&2, &2, E, Unit>),
966  ~report: N -> E -> IO(Unit),
967  observer: N, access: Notices.Access, app: Application<A, K, Policy<H>>, state: S, req: Http.Req
968) -> IO(Completion<S, H>):
969  do IO<Completion<S, H>>:
970    started : Time.Duration <- Time.mono()
971    completion : Completion<S, H> <- dispatch.application(~A, ~S, ~K, ~E, ~H, ~before_hook, ~after_hook, ~run, ~mapper, app, state, req)
972    dispatch.completed(~S, ~N, ~H, ~E, ~notify, ~report, observer, access, started, completion)

Uses (20)

Used by (0)

No other definition uses this definition.