Class KubernetesEndpointGroupBuilder
java.lang.Object
com.linecorp.armeria.client.endpoint.AbstractDynamicEndpointGroupBuilder
com.linecorp.armeria.client.kubernetes.endpoints.KubernetesEndpointGroupBuilder
- All Implemented Interfaces:
DynamicEndpointGroupSetters
@UnstableApi
public final class KubernetesEndpointGroupBuilder
extends AbstractDynamicEndpointGroupBuilder
A builder for creating a new
KubernetesEndpointGroup
.-
Method Summary
Modifier and TypeMethodDescriptionallowEmptyEndpoints
(boolean allowEmptyEndpoints) Sets whether to allow an emptyEndpoint
list.build()
Returns a newly-createdKubernetesEndpointGroup
based on the properties of this builder.Sets the namespace of a Kubernetes cluster.nodeAddressFilter
(Predicate<? super io.fabric8.kubernetes.api.model.NodeAddress> nodeAddressFilter) selectionStrategy
(EndpointSelectionStrategy selectionStrategy) Sets theEndpointSelectionStrategy
of theKubernetesEndpointGroupBuilder
.selectionTimeout
(Duration selectionTimeout) Sets the timeout to wait until a successfulEndpoint
selection.selectionTimeoutMillis
(long selectionTimeoutMillis) Sets the timeout to wait until a successfulEndpoint
selection.serviceName
(String serviceName) Methods inherited from class com.linecorp.armeria.client.endpoint.AbstractDynamicEndpointGroupBuilder
selectionTimeoutMillis, shouldAllowEmptyEndpoints
-
Method Details
-
namespace
Sets the namespace of a Kubernetes cluster. -
serviceName
-
portName
-
nodeAddressFilter
public KubernetesEndpointGroupBuilder nodeAddressFilter(Predicate<? super io.fabric8.kubernetes.api.model.NodeAddress> nodeAddressFilter) -
selectionStrategy
public KubernetesEndpointGroupBuilder selectionStrategy(EndpointSelectionStrategy selectionStrategy) Sets theEndpointSelectionStrategy
of theKubernetesEndpointGroupBuilder
. -
allowEmptyEndpoints
Sets whether to allow an emptyEndpoint
list. If unspecified, the default isfalse
that disallows an emptyEndpoint
list.- Specified by:
allowEmptyEndpoints
in interfaceDynamicEndpointGroupSetters
- Overrides:
allowEmptyEndpoints
in classAbstractDynamicEndpointGroupBuilder
-
selectionTimeout
Description copied from interface:DynamicEndpointGroupSetters
Sets the timeout to wait until a successfulEndpoint
selection.Duration.ZERO
disables the timeout. If unspecified,Flags.defaultConnectTimeoutMillis()
is used by default.- Specified by:
selectionTimeout
in interfaceDynamicEndpointGroupSetters
- Overrides:
selectionTimeout
in classAbstractDynamicEndpointGroupBuilder
-
selectionTimeoutMillis
Description copied from interface:DynamicEndpointGroupSetters
Sets the timeout to wait until a successfulEndpoint
selection.0
disables the timeout. If unspecified,Flags.defaultConnectTimeoutMillis()
is used by default.- Specified by:
selectionTimeoutMillis
in interfaceDynamicEndpointGroupSetters
- Overrides:
selectionTimeoutMillis
in classAbstractDynamicEndpointGroupBuilder
-
build
Returns a newly-createdKubernetesEndpointGroup
based on the properties of this builder.
-