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

Function Get

internal/proxyattributes/proxyattributes.go:49–54  ·  view source on GitHub ↗

Get returns the Options for the proxy [resolver.Address] and a boolean value representing if the attribute is present or not. The returned data should not be mutated.

(addr resolver.Address)

Source from the content-addressed store, hash-verified

47// value representing if the attribute is present or not. The returned data
48// should not be mutated.
49func Get(addr resolver.Address) (Options, bool) {
50 if a := addr.Attributes.Value(proxyOptionsKey); a != nil {
51 return a.(Options), true
52 }
53 return Options{}, false
54}

Callers 3

dialFunction · 0.92
TestGetMethod · 0.70
TestSetMethod · 0.70

Calls 1

ValueMethod · 0.45

Tested by 2

TestGetMethod · 0.56
TestSetMethod · 0.56