Package io.vertx.serviceresolver.kube

## Class KubernetesServiceAddressBuilder

- java.lang.Object
- - io.vertx.serviceresolver.kube.KubernetesServiceAddressBuilder

-     public class KubernetesServiceAddressBuilder
      extends Object

  Build a `ServiceAddress` for Kubernetes capable of distinguish a service endpoint by their port.

  This is useful when dealing with pods exposing multiple ports.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `KubernetesServiceAddressBuilder​(String name)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ServiceAddress` | `build()` |
    `static KubernetesServiceAddressBuilder` | `of​(String name)` |
    `KubernetesServiceAddressBuilder` | `withPortName​(String name)` | Specify a TCP port `name`, otherwise any port will be matched.
    `KubernetesServiceAddressBuilder` | `withPortNumber​(int number)` | Specify a port `number`, otherwise any port will be matched.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### KubernetesServiceAddressBuilder

          public KubernetesServiceAddressBuilder​(String name)

  - ### Method Detail

    - #### of

          public static KubernetesServiceAddressBuilder of​(String name)

    - #### build

          public ServiceAddress build()

      Returns:
        the fully build service address

    - #### withPortNumber

          public KubernetesServiceAddressBuilder withPortNumber​(int number)

      Specify a port `number`, otherwise any port will be matched.
      Parameters:
        `number` - the port number, must be positive
      Returns:
        this builder

    - #### withPortName

          public KubernetesServiceAddressBuilder withPortName​(String name)

      Specify a TCP port `name`, otherwise any port will be matched.
      Parameters:
        `name` - the port name
      Returns:
        this builder