// subsetsEquivalent checks if two endpoint subsets are significantly equivalent
// I.e. that they have the same ready addresses, host names, ports (including protocol
// and service names for SRV)
335212
func subsetsEquivalent(sa, sb object.EndpointSubset) bool {
	if len(sa.Addresses) != len(sb.Addresses) {
		return false
	}
	if len(sa.Ports) != len(sb.Ports) {
		return false
	}

	// in Addresses and Ports, we should be able to rely on
	// these being sorted and able to be compared
	// they are supposed to be in a canonical format
	for addr, aaddr := range sa.Addresses {
		baddr := sb.Addresses[addr]
		if aaddr.IP != baddr.IP {
			return false
		}
		if aaddr.Hostname != baddr.Hostname {
			return false
		}
	}

	for port, aport := range sa.Ports {
		bport := sb.Ports[port]
		if aport.Name != bport.Name {
			return false
		}
		if aport.Port != bport.Port {
			return false
		}
		if aport.Protocol != bport.Protocol {
			return false
		}
	}
	return true
}
883055
func (s *DefaultService) LookupPullEndpoints(hostname string) (endpoints []APIEndpoint, err error) {
	s.mu.Lock()
	defer s.mu.Unlock()

	return s.lookupEndpoints(hostname)
}
68569
func (p PortConfiguration) DeepEquals(o PortConfiguration) bool {
	if len(p) != len(o) {
		return false
	}

	for portName1, port1 := range p {
		port2, ok := o[portName1]

		if !ok || !port1.Equals(port2) {
			return false
		}
	}

	return true
}
693694
func Convert_core_EndpointSubset_To_v1_EndpointSubset(in *core.EndpointSubset, out *v1.EndpointSubset, s conversion.Scope) error {
	return autoConvert_core_EndpointSubset_To_v1_EndpointSubset(in, out, s)
}
1197352
func (v *Validator) CompareProposerPriority(other *Validator) *Validator {
	if v == nil {
		return other
	}
	if v.ProposerPriority > other.ProposerPriority {
		return v
	} else if v.ProposerPriority < other.ProposerPriority {
		return other
	} else {
		result := bytes.Compare(v.Address, other.Address)
		if result < 0 {
			return v
		} else if result > 0 {
			return other
		} else {
			cmn.PanicSanity("Cannot compare identical validators")
			return nil
		}
	}
}
135496
func (e *EmptyList) Equiv(o interface{}) bool {
	if e == o {
		return true
	}

	if s, ok := o.(iseq.Seqable); ok {
		return s.Seq() == nil
	}

	return false
}
202308
func (info *BaseEndpointInfo) Equal(other Endpoint) bool {
	return info.String() == other.String() && info.GetIsLocal() == other.GetIsLocal()
}
442747
func ForwardToReplicasEqual(o1, o2 *ForwardToReplicasOption) bool {
	if o1 != nil {
		return o1.Equal(o2)
	}
	if o2 != nil {
		return o2.Equal(o1)
	}
	return true
}
76658
func Convert_core_NodeAffinity_To_v1_NodeAffinity(in *core.NodeAffinity, out *v1.NodeAffinity, s conversion.Scope) error {
	return autoConvert_core_NodeAffinity_To_v1_NodeAffinity(in, out, s)
}
1169710
func (client *GRPCClient) MutualTLSRequired() bool {
	return client.tlsConfig != nil &&
		len(client.tlsConfig.Certificates) > 0
}
622231
func (cps ComparablePrincipalSet) IsSubset(sets ComparablePrincipalSet) bool {
	for _, p1 := range cps {
		var found bool
		for _, p2 := range sets {
			if reflect.DeepEqual(p1, p2) {
				found = true
			}
		}
		if !found {
			return false
		}
	}
	return true
}
1184855
func NewEnquireLinkRespSeq(seq uint32) Body {
	b := newEnquireLinkResp(&Header{ID: EnquireLinkRespID, Seq: seq})
	b.init()
	return b
}
1076285
func (o RoleOptions) Equals(other RoleOptions) bool {
	return (o.ForwardAgent.Value() == other.ForwardAgent.Value() &&
		o.MaxSessionTTL.Value() == other.MaxSessionTTL.Value() &&
		BoolDefaultTrue(o.PortForwarding) == BoolDefaultTrue(other.PortForwarding) &&
		o.CertificateFormat == other.CertificateFormat &&
		o.ClientIdleTimeout.Value() == other.ClientIdleTimeout.Value() &&
		o.DisconnectExpiredCert.Value() == other.DisconnectExpiredCert.Value())
}
1374988
func (v *RPC) Equals(rhs *RPC) bool {
	if v == nil {
		return rhs == nil
	} else if rhs == nil {
		return false
	}
	if !bytes.Equal(v.SpanContext, rhs.SpanContext) {
		return false
	}
	if !(v.CallerName == rhs.CallerName) {
		return false
	}
	if !(v.ServiceName == rhs.ServiceName) {
		return false
	}
	if !(v.Encoding == rhs.Encoding) {
		return false
	}
	if !(v.Procedure == rhs.Procedure) {
		return false
	}
	if !((v.Headers == nil && rhs.Headers == nil) || (v.Headers != nil && rhs.Headers != nil && _Map_String_String_Equals(v.Headers, rhs.Headers))) {
		return false
	}
	if !_String_EqualsPtr(v.ShardKey, rhs.ShardKey) {
		return false
	}
	if !_String_EqualsPtr(v.RoutingKey, rhs.RoutingKey) {
		return false
	}
	if !_String_EqualsPtr(v.RoutingDelegate, rhs.RoutingDelegate) {
		return false
	}
	if !((v.Body == nil && rhs.Body == nil) || (v.Body != nil && rhs.Body != nil && bytes.Equal(v.Body, rhs.Body))) {
		return false
	}

	return true
}
242797
func (s IPPermissionSet) Equal(s2 IPPermissionSet) bool {
	return len(s) == len(s2) && s.IsSuperset(s2)
}
154512
func (c *Client) ListAffinityGroupTypes(p *ListAffinityGroupTypesParameter) ([]*AffinityGroupType, error) {
	obj, err := c.Request("listAffinityGroupTypes", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.([]*AffinityGroupType), err
}
881515
func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
	if h, ok := t.(tHelper); ok {
		h.Helper()
	}
	if assert.Subset(t, list, subset, msgAndArgs...) {
		return
	}
	t.FailNow()
}