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)
| 47 | // value representing if the attribute is present or not. The returned data |
| 48 | // should not be mutated. |
| 49 | func 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 | } |