kubernetes/vendor/google.golang.org/grpc/resolver/map.go

type addressMapEntry

type AddressMap

func toMapKey(addr *Address) Address {}

type addressMapEntryList

// NewAddressMap creates a new AddressMap.
func NewAddressMap() *AddressMap {}

// find returns the index of addr in the addressMapEntry slice, or -1 if not
// present.
func (l addressMapEntryList) find(addr Address) int {}

// Get returns the value for the address in the map, if present.
func (a *AddressMap) Get(addr Address) (value any, ok bool) {}

// Set updates or adds the value to the address in the map.
func (a *AddressMap) Set(addr Address, value any) {}

// Delete removes addr from the map.
func (a *AddressMap) Delete(addr Address) {}

// Len returns the number of entries in the map.
func (a *AddressMap) Len() int {}

// Keys returns a slice of all current map keys.
func (a *AddressMap) Keys() []Address {}

// Values returns a slice of all current map values.
func (a *AddressMap) Values() []any {}

type endpointNode

// Equal returns whether the unordered set of addrs are the same between the
// endpoint nodes.
func (en *endpointNode) Equal(en2 *endpointNode) bool {}

func toEndpointNode(endpoint Endpoint) endpointNode {}

type EndpointMap

// NewEndpointMap creates a new EndpointMap.
func NewEndpointMap() *EndpointMap {}

// Get returns the value for the address in the map, if present.
func (em *EndpointMap) Get(e Endpoint) (value any, ok bool) {}

// Set updates or adds the value to the address in the map.
func (em *EndpointMap) Set(e Endpoint, value any) {}

// Len returns the number of entries in the map.
func (em *EndpointMap) Len() int {}

// 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 be
// used for EndpointMap accesses.
func (em *EndpointMap) Keys() []Endpoint {}

// Values returns a slice of all current map values.
func (em *EndpointMap) Values() []any {}

// find returns a pointer to the endpoint node in em if the endpoint node is
// already present. If not found, nil is returned. The comparisons are done on
// the unordered set of addresses within an endpoint.
func (em EndpointMap) find(e endpointNode) *endpointNode {}

// Delete removes the specified endpoint from the map.
func (em *EndpointMap) Delete(e Endpoint) {}