Class ConsulServiceInstance

java.lang.Object
io.micronaut.discovery.consul.ConsulServiceInstance
All Implemented Interfaces:
io.micronaut.discovery.ServiceInstance

public class ConsulServiceInstance extends Object implements io.micronaut.discovery.ServiceInstance
A ServiceInstance for Consul.
Since:
1.0
Author:
graemerocher
  • Constructor Details

    • ConsulServiceInstance

      public ConsulServiceInstance(@NonNull @NonNull HealthEntry healthEntry, @Nullable @Nullable String scheme)
      Constructs a ConsulServiceInstance for the given HealthEntry and scheme.
      Parameters:
      healthEntry - The health entry
      scheme - The scheme
  • Method Details

    • getHealthStatus

      public io.micronaut.health.HealthStatus getHealthStatus()
      Specified by:
      getHealthStatus in interface io.micronaut.discovery.ServiceInstance
    • getHealthEntry

      public HealthEntry getHealthEntry()
      Returns:
      The HealthEntry
    • getId

      public String getId()
      Specified by:
      getId in interface io.micronaut.discovery.ServiceInstance
    • getInstanceId

      public Optional<String> getInstanceId()
      Specified by:
      getInstanceId in interface io.micronaut.discovery.ServiceInstance
    • getURI

      public URI getURI()
      Specified by:
      getURI in interface io.micronaut.discovery.ServiceInstance
    • getMetadata

      public io.micronaut.core.convert.value.ConvertibleValues<String> getMetadata()
      Specified by:
      getMetadata in interface io.micronaut.discovery.ServiceInstance