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

Method Keys

resolver/map.go:243–249  ·  view source on GitHub ↗

Keys returns a slice of all current map keys, as endpoints specifying the addresses present in the endpoint keys, in which uniqueness is determined by the unordered set of addresses. Thus, endpoint information returned is not the full endpoint data (drops duplicated addresses and attributes) but can

()

Source from the content-addressed store, hash-verified

241// used for EndpointMap accesses.
242// Deprecated: Use EndpointMap.All() instead.
243func (em *EndpointMap[T]) Keys() []Endpoint {
244 ret := make([]Endpoint, 0, len(em.endpoints))
245 for _, en := range em.endpoints {
246 ret = append(ret, en.decodedKey)
247 }
248 return ret
249}
250
251// Values returns a slice of all current map values.
252// Deprecated: Use EndpointMap.All() instead.

Callers 2

TestAddressMap_KeysMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestAddressMap_KeysMethod · 0.36