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

Method Get

resolver/map.go:215–221  ·  view source on GitHub ↗

Get returns the value for the address in the map, if present.

(e Endpoint)

Source from the content-addressed store, hash-verified

213
214// Get returns the value for the address in the map, if present.
215func (em *EndpointMap[T]) Get(e Endpoint) (value T, ok bool) {
216 val, found := em.endpoints[encodeEndpoint(e)]
217 if found {
218 return val.value, true
219 }
220 return value, false
221}
222
223// Set updates or adds the value to the address in the map.
224func (em *EndpointMap[T]) Set(e Endpoint, value T) {

Callers

nothing calls this directly

Calls 1

encodeEndpointFunction · 0.85

Tested by

no test coverage detected