Class EndpointUtil


@Internal public class EndpointUtil extends Object
This class contains some of the utility functions previously found in DiscoveryClient, but should be elsewhere. It *does not yet* clean up the moved code. Forked from
Tomasz Bak, graemerocher
  • Constructor Details

    • EndpointUtil

      public EndpointUtil()
  • Method Details

    • getServiceUrlsFromDNS

      public static List<String> getServiceUrlsFromDNS(io.micronaut.runtime.server.EmbeddedServer embeddedServer, io.micronaut.runtime.ApplicationConfiguration.InstanceConfiguration instanceConfiguration, DiscoveryClientConfiguration discoveryClientConfiguration)
      Get the list of all eureka service urls from DNS for the eureka client to talk to. The client picks up the service url from its zone and then fails over to other zones randomly. If there are multiple servers in the same zone, the client once again picks one randomly. This way the traffic will be distributed in the case of failures.
      embeddedServer - the embedded server
      instanceConfiguration - The instance configuration
      discoveryClientConfiguration - The discovery client configuration
      The list of all eureka service urls for the eureka client to talk to.