Class KubernetesServiceConfiguration
java.lang.Object
io.micronaut.kubernetes.discovery.KubernetesServiceConfiguration
@EachProperty("kubernetes.client.discovery.services")
public class KubernetesServiceConfiguration
extends Object
Discovery configuration for Kubernetes service.
- Since:
- 2.2
-
Field Summary
-
Constructor Summary
ConstructorDescriptionKubernetesServiceConfiguration
(String serviceId) KubernetesServiceConfiguration
(String serviceId, boolean manual) KubernetesServiceConfiguration
(String serviceId, String name, String namespace) KubernetesServiceConfiguration
(String serviceId, String name, String namespace, String mode, String port, boolean manual) -
Method Summary
Modifier and TypeMethodDescriptiongetMode()
getName()
Namespace of service.getPort()
Port configuration in case of multi-port resource.boolean
isManual()
This field is for inner use to mark manually configured services.void
Set service discovery mode.void
Set service name.void
setNamespace
(String namespace) Service namespace.void
Sets port number.void
setServiceId
(String serviceId) Set service id.toString()
-
Field Details
-
NAME
- See Also:
-
PREFIX
- See Also:
-
-
Constructor Details
-
KubernetesServiceConfiguration
-
KubernetesServiceConfiguration
-
KubernetesServiceConfiguration
-
KubernetesServiceConfiguration
-
-
Method Details
-
getServiceId
- Returns:
- service id
-
setServiceId
Set service id.- Parameters:
serviceId
- the service id
-
getName
- Returns:
- the service name
-
setName
Set service name.- Parameters:
name
- the service name
-
getNamespace
Namespace of service. If null then default configured namespace is used.- Returns:
- namespace the namespace
-
setNamespace
Service namespace.- Parameters:
namespace
- the namespace
-
getMode
- Returns:
- service discovery mode
-
setMode
Set service discovery mode.- Parameters:
mode
- mode
-
getPort
Port configuration in case of multi-port resource.- Returns:
- port number
-
setPort
Sets port number. Required in case of multi-port resource.- Parameters:
port
- port number
-
isManual
public boolean isManual()This field is for inner use to mark manually configured services. All configurations onPREFIX
are manually configured.- Returns:
- true if manually configured otherwise false
-
toString
-