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
()
| 265 | // duplicated addresses and attributes) but can be used for EndpointMap |
| 266 | // accesses. |
| 267 | func (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. |
| 278 | func (em *EndpointMap[T]) Delete(e Endpoint) { |
no outgoing calls