NativeHttp.send_with: def of bend-trace-context@0.2.0.0 Import: import bend-trace-context@0.2.0.0/native_http.bend as NativeHttp Lines 133-144 of bend-trace-context@0.2.0.0/native_http.bend: https://jend.leeeet.dev/read.txt?path=bend-trace-context@0.2.0.0/native_http.bend&start_line=133&end_line=144 import Base import bend-trace-context@0.2.0.0/trace_context.bend as TC # Give one request that the service sends the context of a new operation, on # a caller's source: TC.Context.send_with on the carrier of `headers`, the # request's own header map, and the map of the fields it gives back (law # http_send). The request's old context fields go, whatever the case of # their names, and the new ones replace them; without a new operation, the # map forwards the received pair or carries no context fields. def send_with(~S: Type, ~read: S -> IO(S & Result<&1, &1, U32 & String, U32>), source: S, +limits: TC.Limits, service: TC.Service, sampling: TC.Sampling, +policy: TC.FailurePolicy, headers: HeaderMap()) -> IO(S & TC.FailurePolicy.result(policy, Outbound)): IO.bind(S & TC.FailurePolicy.result(policy, TC.Sent), S & TC.FailurePolicy.result(policy, Outbound), TC.Context.send_with(~S, ~read, source, limits, service, sampling, policy, carrier(headers)), done => IO.pure(S & TC.FailurePolicy.result(policy, Outbound), Headers.written.done(S, policy, done))) Uses (18): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Pair https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Result https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/native_http.bend&name=HeaderMap https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/native_http.bend&name=Headers.written.done https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/native_http.bend&name=Outbound https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/native_http.bend&name=carrier https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Context.send_with https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=FailurePolicy https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=FailurePolicy.result https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Limits https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Sampling https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Sent https://jend.leeeet.dev/definition.txt?path=bend-trace-context@0.2.0.0/trace_context.bend&name=Service