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

Method Keys

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

Keys returns the keys stored in the carrier's context metadata. It returns keys from outgoing context metadata.

()

Source from the content-addressed store, hash-verified

113// Keys returns the keys stored in the carrier's context metadata. It returns
114// keys from outgoing context metadata.
115func (c *OutgoingCarrier) Keys() []string {
116 md, ok := metadata.FromOutgoingContext(c.ctx)
117 if !ok {
118 return nil
119 }
120 keys := make([]string, 0, len(md))
121 for key := range md {
122 keys = append(keys, key)
123 }
124 return keys
125}
126
127// Context returns the underlying context associated with the
128// `OutgoingCarrier“.

Callers 1

TestOutgoingCarrierMethod · 0.95

Calls 1

FromOutgoingContextFunction · 0.92

Tested by 1

TestOutgoingCarrierMethod · 0.76