def continue_or_start_with

bend-trace-context@0.2.0.0 · native_http.bend:94

import bend-trace-context@0.2.0.0/native_http.bend as NativeHttp
import Base
import bend-trace-context@0.2.0.0/trace_context.bend as TC

94# The service's own operation for a received message, from the header map of
95# its request, on a caller's source: TC.Context.continue_or_start_with over
96# the extraction of the map's carrier (law http_continue). `base` is the
97# context to keep when the request carries no usable traceparent.
98def continue_or_start_with(~S: Type, ~read: S -> IO(S & Result<&1, &1, U32 & String, U32>), source: S,
99  +limits: TC.Limits, headers: HeaderMap(), base: Maybe<&2, TC.BaseContext>, reception: TC.Reception,
100  sampling: TC.Sampling, +policy: TC.FailurePolicy) -> IO(S & TC.FailurePolicy.result(policy, TC.Service)):
101  TC.Context.continue_or_start_with(~S, ~read, source, TC.Context.extract(limits, carrier(headers), base), reception,
102    sampling, policy)

Uses (17)

Used by (1)