Class KubernetesServiceAddressBuilder
java.lang.Object
io.vertx.serviceresolver.kube.KubernetesServiceAddressBuilder
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 -
Method Summary
Modifier and TypeMethodDescriptionbuild()withPortName(String name) Specify a TCP portname, otherwise any port will be matched.withPortNumber(int number) Specify a portnumber, otherwise any port will be matched.
-
Constructor Details
-
KubernetesServiceAddressBuilder
-
-
Method Details
-
of
-
build
- Returns:
- the fully build service address
-
withPortNumber
Specify a portnumber, otherwise any port will be matched.- Parameters:
number- the port number, must be positive- Returns:
- this builder
-
withPortName
Specify a TCP portname, otherwise any port will be matched.- Parameters:
name- the port name- Returns:
- this builder
-