Interface ReactiveDiscoveryClient
- All Superinterfaces:
org.springframework.core.Ordered
- All Known Implementing Classes:
ReactiveCompositeDiscoveryClient,SimpleReactiveDiscoveryClient
public interface ReactiveDiscoveryClient
extends org.springframework.core.Ordered
Represents read operations commonly available to discovery services such as Netflix
Eureka or consul.io.
- Author:
- Tim Ysewyn
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intDefault order of the discovery client.Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Method Summary
Modifier and TypeMethodDescriptionA human-readable description of the implementation, used in HealthIndicator.reactor.core.publisher.Flux<ServiceInstance>getInstances(String serviceId) Gets all ServiceInstances associated with a particular serviceId.default intgetOrder()Default implementation for getting order of discovery clients.reactor.core.publisher.Flux<String>default voidprobe()Can be used to verify the client is still valid and able to make calls.
-
Field Details
-
DEFAULT_ORDER
static final int DEFAULT_ORDERDefault order of the discovery client.- See Also:
-
-
Method Details
-
description
String description()A human-readable description of the implementation, used in HealthIndicator.- Returns:
- The description.
-
getInstances
Gets all ServiceInstances associated with a particular serviceId.- Parameters:
serviceId- The serviceId to query.- Returns:
- A List of ServiceInstance.
-
getServices
reactor.core.publisher.Flux<String> getServices()- Returns:
- All known service IDs.
-
probe
default void probe()Can be used to verify the client is still valid and able to make calls.A successful invocation with no exception thrown implies the client is able to make calls.
The default implementation simply calls
getServices()- client implementations can override with a lighter weight operation if they choose to. -
getOrder
default int getOrder()Default implementation for getting order of discovery clients.- Specified by:
getOrderin interfaceorg.springframework.core.Ordered- Returns:
- order
-