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

Method Set

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

Set stores the key-value pair in the carrier's outgoing context metadata. If the key already exists, given value is appended to the last.

(key, value string)

Source from the content-addressed store, hash-verified

107//
108// If the key already exists, given value is appended to the last.
109func (c *OutgoingCarrier) Set(key, value string) {
110 c.ctx = metadata.AppendToOutgoingContext(c.ctx, key, value)
111}
112
113// Keys returns the keys stored in the carrier's context metadata. It returns
114// keys from outgoing context metadata.

Callers 1

TestOutgoingCarrierMethod · 0.95

Calls 1

AppendToOutgoingContextFunction · 0.92

Tested by 1

TestOutgoingCarrierMethod · 0.76