MCPcopy Index your code
hub / github.com/Effect-TS/effect / fromHeaders

Function fromHeaders

packages/platform/src/HttpTraceContext.ts:32–42  ·  view source on GitHub ↗
(headers: Headers.Headers)

Source from the content-addressed store, hash-verified

30 * @category decoding
31 */
32export const fromHeaders = (headers: Headers.Headers): Option.Option<Tracer.ExternalSpan> => {
33 let span = w3c(headers)
34 if (span._tag === "Some") {
35 return span
36 }
37 span = b3(headers)
38 if (span._tag === "Some") {
39 return span
40 }
41 return xb3(headers)
42}
43
44/**
45 * @since 1.0.0

Callers

nothing calls this directly

Calls 3

w3cFunction · 0.85
b3Function · 0.85
xb3Function · 0.85

Tested by

no test coverage detected