Class KubernetesDiscoveryClient

java.lang.Object
io.micronaut.kubernetes.discovery.KubernetesDiscoveryClient
All Implemented Interfaces:
io.micronaut.core.naming.Described, io.micronaut.discovery.DiscoveryClient, Closeable, AutoCloseable

@Singleton @Requires(env="k8s") @Requires(property="kubernetes.client.discovery.enabled",notEquals="false",defaultValue="true") public class KubernetesDiscoveryClient extends Object implements io.micronaut.discovery.DiscoveryClient
A DiscoveryClient implementation for Kubernetes using the API.
Since:
1.0.0
Author:
Álvaro Sánchez-Mariscal
  • Field Details

  • Constructor Details

  • Method Details

    • getInstances

      public org.reactivestreams.Publisher<List<io.micronaut.discovery.ServiceInstance>> getInstances(String serviceId)
      Specified by:
      getInstances in interface io.micronaut.discovery.DiscoveryClient
    • getServiceIds

      public org.reactivestreams.Publisher<List<String>> getServiceIds()
      Specified by:
      getServiceIds in interface io.micronaut.discovery.DiscoveryClient
      Returns:
      A list of services metadata's name.
    • getDescription

      @NonNull public @NonNull String getDescription()
      Specified by:
      getDescription in interface io.micronaut.core.naming.Described
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable