def Serve.replaced

bend-trace-context@0.2.0.0 · trace_context.bend:3544

import bend-trace-context@0.2.0.0/trace_context.bend as TraceContext
import Base

3544# The context that a restart replaces, as Generation.restart takes it: an
3545# incoming base's received context, or an outgoing base's operation as
3546# another participant receives it. The new trace ID reuses neither.
3547def Serve.replaced(base: BaseContext) -> RemoteContext:
3548  match base:
3549    case IncomingBase{incoming}:
3550      IncomingContext.context(incoming)
3551    case OutgoingBase{outgoing}:
3552      RemoteContext.from_traceparent(LocalContext.to_traceparent(OutgoingContext.context(outgoing)))

Uses (6)

Used by (1)