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

Function Get

internal/metadata/metadata.go:61–68  ·  view source on GitHub ↗

Get returns the metadata of addr.

(addr resolver.Address)

Source from the content-addressed store, hash-verified

59
60// Get returns the metadata of addr.
61func Get(addr resolver.Address) metadata.MD {
62 attrs := addr.Attributes
63 if attrs == nil {
64 return nil
65 }
66 md, _ := attrs.Value(mdKey).(mdValue)
67 return metadata.MD(md)
68}
69
70// Set sets (overrides) the metadata in addr.
71//

Callers 2

TestGetFunction · 0.70
TestSetFunction · 0.70

Calls 2

MDTypeAlias · 0.92
ValueMethod · 0.45

Tested by 2

TestGetFunction · 0.56
TestSetFunction · 0.56