All Superinterfaces:
AutoCloseable, Discovery, RuntimeType.Api<EurekaDiscoveryConfig>

public interface EurekaDiscovery extends RuntimeType.Api<EurekaDiscoveryConfig>, Discovery
A Discovery implementation that communicates with Netflix's Eureka server version 2.

Please see the Discovery documentation for important contractual obligations that must be fulfilled by any implementation of this interface.

Configuration

Configuration for EurekaDiscoveryConfig instances is normally found under the top-level Helidon configuration key named discovery, under a sub-key named eureka. Please see the configuration reference for more details.

Configuration for connecting to a Eureka server hosted on localhost, port 8761 (the port used by Eureka by default), looks like this (in YAML format, often in an application.yaml classpath resource):

discovery:
  eureka:
    client:
      base-uri: "http://localhost:8761/eureka"
    enabled: true # true by default; made explicit here for example purposes

Acquisition ("Declarative" Usage)

To acquire a Discovery instance, inject it, using the Service.Inject annotation. Alternatively, use the static Services.get(Class) method, supplying Discovery.class as its sole argument.

Creation ("Imperative" Usage)

Users of the Helidon Builder API may create instances of this interface via the create(EurekaDiscoveryConfig) method. Instances created in this manner are guaranteed to implement all of the contractual requirements of this interface and its (transitive) supertypes.

(Users of the Helidon Builder API may indirectly create instances of the EurekaDiscoveryConfig interface, if required, via the builder() method, which is a Helidon Builder API-mandated convenience method that, by specification, simply delegates to the EurekaDiscoveryConfig.builder() method. See EurekaDiscoveryConfig.builder() for contractual details related to the creation of EurekaDiscoveryConfig.Builder instances. See EurekaDiscoveryConfig for contractual details related to EurekaDiscoveryConfig instances built using EurekaDiscoveryConfig.Builder instances. These contracts do not affect the requirements this interface imposes on its implementations.)

Any other means of implementing this interface is permitted, so long as it results in an implementation that implements the contractual requirements of this interface's (transitive and reflexive) supertypes.

Logging

Implementations created via the create(EurekaDiscoveryConfig) method (which includes instances available via dependency injection), and any internal supporting classes, will use Loggers whose names begin with io.helidon.discovery.providers.eureka..

Logging output is particularly important to monitor because as a general rule Discovery implementations must strive to be resilient in the presence of failures.

Design note: This interface extends Api<EurekaDiscoveryConfig> to conform to the requirements of the Helidon Builder API. Implementations of this interface must therefore also abide by its contract.

See Also: