Interface ServiceDiscoveryProducer


public interface ServiceDiscoveryProducer
Interface for producing ServiceDiscovery instances.

Implementations of this interface are responsible for creating and configuring appropriate ServiceDiscovery instances based on the application's configuration. This allows for different service discovery mechanisms (e.g., Consul, Stork, etc.) to be plugged in based on runtime configuration.

  • Method Summary

    Modifier and Type
    Method
    Description
    Produces a ServiceDiscovery instance based on the current configuration.
  • Method Details

    • produceServiceDiscovery

      ServiceDiscovery produceServiceDiscovery()
      Produces a ServiceDiscovery instance based on the current configuration.

      The implementation should examine the application configuration to determine which type of ServiceDiscovery to instantiate and return. This method is typically called by CDI to provide a ServiceDiscovery bean for injection throughout the application.

      Returns:
      A configured ServiceDiscovery instance suitable for the current environment