Package io.micronaut.discovery.consul
Class ConsulServiceInstanceList
java.lang.Object
io.micronaut.discovery.client.DiscoveryServerInstanceList
io.micronaut.discovery.consul.ConsulServiceInstanceList
- All Implemented Interfaces:
io.micronaut.context.event.ApplicationEventListener<io.micronaut.runtime.server.event.ServerStartupEvent>,io.micronaut.core.order.Ordered,io.micronaut.discovery.ServiceInstanceList,EventListener
@Singleton
@RequiresConsul
public class ConsulServiceInstanceList
extends DiscoveryServerInstanceList
A ServiceInstanceList for Consul which reads from the
ConsulConfiguration.
The reason this is useful is if a RefreshEvent occurs then
the ConsulConfiguration will be updated and the backing list of ServiceInstance
changed at runtime.
- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionConsulServiceInstanceList(ConsulConfiguration configuration, io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration instanceConfiguration) Creates a new consul service instance list. -
Method Summary
Methods inherited from class io.micronaut.discovery.client.DiscoveryServerInstanceList
getInstances, getOrder, onApplicationEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.context.event.ApplicationEventListener
supportsMethods inherited from interface io.micronaut.discovery.ServiceInstanceList
getContextPath
-
Constructor Details
-
ConsulServiceInstanceList
public ConsulServiceInstanceList(ConsulConfiguration configuration, io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration instanceConfiguration) Creates a new consul service instance list.- Parameters:
configuration- The discovery configinstanceConfiguration- The instance config
-
-
Method Details
-
getID
-