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

Method All

resolver/map.go:267–275  ·  view source on GitHub ↗

All returns an iterator over all elements. The map keys are endpoints specifying the addresses present in the endpoint map, 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 attribute

()

Source from the content-addressed store, hash-verified

265// duplicated addresses and attributes) but can be used for EndpointMap
266// accesses.
267func (em *EndpointMap[T]) All() iter.Seq2[Endpoint, T] {
268 return func(yield func(Endpoint, T) bool) {
269 for _, en := range em.endpoints {
270 if !yield(en.decodedKey, en.value) {
271 return
272 }
273 }
274 }
275}
276
277// Delete removes the specified endpoint from the map.
278func (em *EndpointMap[T]) Delete(e Endpoint) {

Callers 15

UpdateStateMethod · 0.45
startFirstPassLockedMethod · 0.45
closeSubConnsLockedMethod · 0.45
UpdateClientConnStateMethod · 0.45
regeneratePickerMethod · 0.45
UpdateStateMethod · 0.45
updatePickerLockedMethod · 0.45
newPickerLockedMethod · 0.45
aggregatedStateLockedMethod · 0.45

Calls

no outgoing calls

Tested by 2

TestAddressMap_AllMethod · 0.36
TestEndpointMap_AllMethod · 0.36