Class EurekaClientService
Inheritance
System.Object
EurekaClientService
Namespace: Steeltoe.Discovery.Eureka
Assembly: Steeltoe.Discovery.Eureka.dll
Syntax
public static class EurekaClientService : object
Methods
| Edit this page View SourceGetInstances(IConfiguration, String, ILoggerFactory)
Using the Eureka configuration values provided in configuration
contact the Eureka server and
return all the service instances for the provided serviceId
. The Eureka client is shutdown after contacting the server.
Declaration
public static IList<IServiceInstance> GetInstances(IConfiguration configuration, string serviceId, ILoggerFactory logFactory = null)
Parameters
Type | Name | Description |
---|---|---|
IConfiguration | configuration | configuration values used for configuring the Eureka client |
System.String | serviceId | the Eureka service id to look up all instances of |
ILoggerFactory | logFactory | optional log factory to use for logging |
Returns
Type | Description |
---|---|
IList<IServiceInstance> | service instances |
GetServices(IConfiguration, ILoggerFactory)
Using the Eureka configuration values provided in configuration
contact the Eureka server and
return all the registered services. The Eureka client is shutdown after contacting the server.
Declaration
public static IList<string> GetServices(IConfiguration configuration, ILoggerFactory logFactory = null)
Parameters
Type | Name | Description |
---|---|---|
IConfiguration | configuration | configuration values used for configuring the Eureka client |
ILoggerFactory | logFactory | optional log factory to use for logging |
Returns
Type | Description |
---|---|
IList<System.String> | all registered services |