Package io.smallrye.stork.api
Interface LoadBalancer
-
public interface LoadBalancerWorks with a single service name. Provides a single service instance.
Must be non-blocking
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ServiceInstanceselectServiceInstance(Collection<ServiceInstance> serviceInstances)Select a singleServiceInstancefrom the given list.
-
-
-
Method Detail
-
selectServiceInstance
ServiceInstance selectServiceInstance(Collection<ServiceInstance> serviceInstances)
Select a singleServiceInstancefrom the given list.- Parameters:
serviceInstances- instances to choose from- Returns:
- a ServiceInstance
- Throws:
NoServiceInstanceFoundException- if the incoming collection is empty or all the service instances in the collection are deemed invalid for some reason
-
-