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

Method GetMetadata

stats/opentelemetry/csm/pluginoption.go:69–73  ·  view source on GitHub ↗

NewLabelsMD returns a metadata.MD with the CSM labels as an encoded protobuf Struct as the value of "x-envoy-peer-metadata".

()

Source from the content-addressed store, hash-verified

67// NewLabelsMD returns a metadata.MD with the CSM labels as an encoded protobuf
68// Struct as the value of "x-envoy-peer-metadata".
69func (cpo *pluginOption) GetMetadata() metadata.MD {
70 return metadata.New(map[string]string{
71 metadataExchangeKey: cpo.metadataExchangeLabelsEncoded,
72 })
73}
74
75// GetLabels gets the CSM peer labels from the metadata provided. It returns
76// "unknown" for labels not found. Labels returned depend on the remote type.

Callers

nothing calls this directly

Calls 1

NewFunction · 0.92

Tested by

no test coverage detected