io.smallrye.stork.spi.LoadBalancerProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of stork-api Show documentation
Show all versions of stork-api Show documentation
Main Stork API classes. You are likely to need `smallrye-stork-core` and not this module.
The newest version!
package io.smallrye.stork.spi;
import io.smallrye.stork.api.LoadBalancer;
import io.smallrye.stork.api.ServiceDiscovery;
/**
* A load balancer provider allowing to create instances of load balancers.
*
* Implementation should use the {@link io.smallrye.stork.api.config.LoadBalancerAttribute} to define attributes.
*
* @param the configuration type (class generated from the {@link io.smallrye.stork.api.config.LoadBalancerAttribute}
* annotations).
*/
public interface LoadBalancerProvider {
/**
* Creates a load balancer instance
*
* @param config the configuration
* @param serviceDiscovery the service discovery used for that service
* @return the load balancer
*/
LoadBalancer createLoadBalancer(T config, ServiceDiscovery serviceDiscovery);
}