Class Endpoint

  • All Implemented Interfaces:
    com.marcnuri.yakc.model.Model

    public class Endpoint
    extends java.lang.Object
    implements com.marcnuri.yakc.model.Model
    Endpoint represents a single logical "backend" implementing a service.
    • Constructor Detail

      • Endpoint

        public Endpoint​(@NonNull
                        @NonNull java.util.List<java.lang.String> addresses,
                        EndpointConditions conditions,
                        EndpointHints hints,
                        java.lang.String hostname,
                        java.lang.String nodeName,
                        ObjectReference targetRef,
                        java.util.Map<java.lang.String,​java.lang.String> topology)
      • Endpoint

        public Endpoint()
    • Method Detail

      • getAddresses

        @NonNull
        public @NonNull java.util.List<java.lang.String> getAddresses()
        addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
      • getHostname

        public java.lang.String getHostname()
        hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.
      • getNodeName

        public java.lang.String getNodeName()
        nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
      • getTopology

        public java.util.Map<java.lang.String,​java.lang.String> getTopology()
        topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node

        where the endpoint is located. This should match the corresponding

        node label.

        * topology.kubernetes.io/zone: the value indicates the zone where the

        endpoint is located. This should match the corresponding node label.

        * topology.kubernetes.io/region: the value indicates the region where the

        endpoint is located. This should match the corresponding node label.

        This field is deprecated and will be removed in future api versions.

      • setAddresses

        public void setAddresses​(@NonNull
                                 @NonNull java.util.List<java.lang.String> addresses)
        addresses of this endpoint. The contents of this field are interpreted according to the corresponding EndpointSlice addressType field. Consumers must handle different types of addresses in the context of their own capabilities. This must contain at least one address but no more than 100.
      • setHostname

        public void setHostname​(java.lang.String hostname)
        hostname of this endpoint. This field may be used by consumers of endpoints to distinguish endpoints from each other (e.g. in DNS names). Multiple endpoints which use the same hostname should be considered fungible (e.g. multiple A values in DNS). Must be lowercase and pass DNS Label (RFC 1123) validation.
      • setNodeName

        public void setNodeName​(java.lang.String nodeName)
        nodeName represents the name of the Node hosting this endpoint. This can be used to determine endpoints local to a Node. This field can be enabled with the EndpointSliceNodeName feature gate.
      • setTopology

        public void setTopology​(java.util.Map<java.lang.String,​java.lang.String> topology)
        topology contains arbitrary topology information associated with the endpoint. These key/value pairs must conform with the label format. https://kubernetes.io/docs/concepts/overview/working-with-objects/labels Topology may include a maximum of 16 key/value pairs. This includes, but is not limited to the following well known keys: * kubernetes.io/hostname: the value indicates the hostname of the node

        where the endpoint is located. This should match the corresponding

        node label.

        * topology.kubernetes.io/zone: the value indicates the zone where the

        endpoint is located. This should match the corresponding node label.

        * topology.kubernetes.io/region: the value indicates the region where the

        endpoint is located. This should match the corresponding node label.

        This field is deprecated and will be removed in future api versions.

      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object