MCPcopy
hub / github.com/grpc/grpc-go / NewOutgoingCarrier

Function NewOutgoingCarrier

stats/opentelemetry/internal/tracing/carrier.go:95–97  ·  view source on GitHub ↗

NewOutgoingCarrier creates a new Carrier with the given context. The outgoing carrier should be used with propagator's `Inject()` method in the outgoing rpc path.

(ctx context.Context)

Source from the content-addressed store, hash-verified

93// outgoing carrier should be used with propagator's `Inject()` method in the
94// outgoing rpc path.
95func NewOutgoingCarrier(ctx context.Context) *OutgoingCarrier {
96 return &OutgoingCarrier{ctx: ctx}
97}
98
99// Get just logs an error and returns an empty string. It implements the
100// `TextMapCarrier` interface but should not be used with `OutgoingCarrier`.

Callers 1

TestOutgoingCarrierMethod · 0.85

Calls

no outgoing calls

Tested by 1

TestOutgoingCarrierMethod · 0.68