Interface IEurekaInstanceConfig
Namespace: Steeltoe.Discovery.Eureka
Assembly: Steeltoe.Discovery.Eureka.dll
Syntax
public interface IEurekaInstanceConfig
Properties
| Edit this page View SourceAppGroupName
Gets or sets the name of the application group to be registered with eureka. Configuration property: eureka:instance:appGroup
Declaration
string AppGroupName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
AppName
Gets or sets the name of the application to be registered with eureka. Configuration property: eureka:instance:name
Declaration
string AppName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
ASGName
Gets or sets the
AWS autoscaling group name
associated with this instance. This information is
specifically used in an AWS environment to automatically put an instance out of service after the instance is
launched and it has been disabled for traffic..
Configuration property: eureka:instance:asgName
Declaration
string ASGName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
DataCenterInfo
Gets or sets the data center this instance is deployed. This information is used to get some AWS specific instance information if the instance is deployed in AWS.
Declaration
IDataCenterInfo DataCenterInfo { get; set; }
Property Value
Type | Description |
---|---|
IDataCenterInfo |
DefaultAddressResolutionOrder
Gets or sets an instance's network addresses should be fully expressed in it's DataCenterInfo For example for instances in AWS, this will include the publicHostname, publicIp, privateHostname and privateIp, when available. The InstanceInfo will further express a "default address", which is a field that can be configured by the registering instance to advertise it's default address. This configuration allowed for the expression of an ordered list of fields that can be used to resolve the default address. The exact field values will depend on the implementation details of the corresponding implementing DataCenterInfo types.
Declaration
IEnumerable<string> DefaultAddressResolutionOrder { get; set; }
Property Value
Type | Description |
---|---|
IEnumerable<System.String> |
HealthCheckUrl
Gets or sets gets the absolute health check page URL for this instance. The users can provide the path if the health check page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence.
It is normally used for making educated decisions based on the health of the instance - for example, it can be used to determine whether to/ proceed deployments to an entire farm or stop the deployments without causing further damage. The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime. Configuration property: eureka:instance:healthCheckUrl
Declaration
string HealthCheckUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HealthCheckUrlPath
Gets or sets gets the relative health check URL Path for this instance. The health check page URL is then constructed out of the GetHostName(Boolean) and the type of communication - secure or unsecure as specified in SecurePort and NonSecurePort
It is normally used for making educated decisions based on the health of the instance - for example, it can be used to determine whether to proceed deployments to an entire farm or stop the deployments without causing further damage. Configuration property: eureka:instance:healthCheckUrlPath
Declaration
string HealthCheckUrlPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HomePageUrl
Gets or sets gets the absolute home page URL for this instance. The users can provide the path if the home page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence.
It is normally used for informational purposes for other services tofind about the status of this instance. Users can provide a simple
HTML
indicating what is the current status of the instance.
The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is
replaced at runtime.
Configuration property: eureka:instance:homePageUrl
Declaration
string HomePageUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HomePageUrlPath
Gets or sets gets the relative home page URL Path for this instance. The home page URL is then constructed out of the GetHostName(Boolean) and the type of communication - secure or unsecure as specified in SecurePort and NonSecurePort
It is normally used for informational purposes for other services to use it as a landing page. Configuration property: eureka:instance:homePageUrlPath
Declaration
string HomePageUrlPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
HostName
Declaration
string HostName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
InstanceId
Gets or sets the unique Id (within the scope of the appName) of this instance to be registered with eureka. Configuration property: eureka:instance:instanceId
Declaration
string InstanceId { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IpAddress
Gets or sets the IPAdress of the instance. This information is for academic purposes only as the communication from other instances primarily happen using the information supplied in GetHostName(Boolean)
Declaration
string IpAddress { get; set; }
Property Value
Type | Description |
---|---|
System.String |
IsInstanceEnabledOnInit
Gets or sets a value indicating whether indicates whether the instance should be enabled for taking traffic as soon as it is registered with eureka. Sometimes the application might need to do some pre-processing before it is ready to take traffic. Configuration property: eureka:instance:instanceEnabledOnInit
Declaration
bool IsInstanceEnabledOnInit { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNonSecurePortEnabled
Gets or sets a value indicating whether indicates whether the
non-secure
port should be enabled for traffic or not.
Set true if the non-secure
port is enabled, false otherwise.
Configuration property: eureka:instance:nonSecurePortEnabled
Declaration
bool IsNonSecurePortEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
LeaseExpirationDurationInSeconds
Gets or sets indicates the time in seconds that the eureka server waits since it received the last heartbeat before it can remove this instance from its view and there by disallowing traffic to this instance.
Setting this value too long could mean that the traffic could be routed to the instance even though the instance is not alive. Setting this value too small could mean, the instance may be taken out of traffic because of temporary network glitches.This value to be set to atleast higher than the value specified in LeaseRenewalIntervalInSeconds Configuration property: eureka:instance:leaseExpirationDurationInSeconds
Declaration
int LeaseExpirationDurationInSeconds { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
LeaseRenewalIntervalInSeconds
Gets or sets indicates how often (in seconds) the eureka client needs to send heartbeats to eureka server to indicate that it is still alive. If the heartbeats are not received for the period specified in LeaseExpirationDurationInSeconds, eureka server will removethe instance from its view, there by disallowing traffic to this instance. Note that the instance could still not take traffic if it implements HealthCheckCallback and then decides to make itself unavailable. Configuration property: eureka:instance:leaseRenewalIntervalInSeconds
Declaration
int LeaseRenewalIntervalInSeconds { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
MetadataMap
Gets or sets the metadata name/value pairs associated with this instance. This information is sent to eureka server and can be used by other instances. Configuration property: eureka:instance:metadataMap
Declaration
IDictionary<string, string> MetadataMap { get; set; }
Property Value
Type | Description |
---|---|
IDictionary<System.String, System.String> |
NonSecurePort
Gets or sets the
non-secure
port on which the instance should receive traffic.
Configuration property: eureka:instance:port
Declaration
int NonSecurePort { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
PreferIpAddress
Declaration
bool PreferIpAddress { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SecureHealthCheckUrl
Gets or sets gets the absolute secure health check page URL for this instance. The users can provide the path if the health check page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence.
It is normally used for making educated decisions based on the health of the instance - for example, it can be used to determine whether to/ proceed deployments to an entire farm or stop the deployments without causing further damage. The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime. Configuration property: eureka:instance:secureHealthCheckUrl
Declaration
string SecureHealthCheckUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
SecurePort
Gets or sets the
Secure port
on which the instance should receive traffic.
Configuration property: eureka:instance:securePort
Declaration
int SecurePort { get; set; }
Property Value
Type | Description |
---|---|
System.Int32 |
SecurePortEnabled
Gets or sets a value indicating whether indicates whether the
secure
port should be enabled for traffic or not.
Set true if the secure
port is enabled, false otherwise.
Configuration property: eureka:instance:securePortEnabled
Declaration
bool SecurePortEnabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
SecureVirtualHostName
Gets or sets the secure virtual host name defined for this instance.
This is typically the way other instance would find this instance by using the virtual host name. Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance. Configuration property: eureka:instance:secureVipAddress
Declaration
string SecureVirtualHostName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
StatusPageUrl
Gets or sets the absolute status page for this instance. The users can provide the StatusPageUrlPath if the status page resides in the same instance talking to eureka, else in the cases where the instance is a proxy for some other server, users can provide the full URL. If the full URL is provided it takes precedence.
It is normally used for informational purposes for other services tofind about the status of this instance. Users can provide a simple
HTML
indicating what is the current status of the instance.
The full URL should follow the format http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is
replaced at runtime.
Configuration property: eureka:instance:statusPageUrl
Declaration
string StatusPageUrl { get; set; }
Property Value
Type | Description |
---|---|
System.String |
StatusPageUrlPath
Gets or sets the relative status page Path for this instance. The status page URL is then constructed out of the GetHostName(Boolean) and the type of communication - secure or unsecure as specified in SecurePort and NonSecurePort.
It is normally used for informational purposes for other services to findabout the status of this instance. Users can provide a simple
HTML
indicating what is the current status of the instance.
Configuration property: eureka:instance:statusPageUrlPath
Declaration
string StatusPageUrlPath { get; set; }
Property Value
Type | Description |
---|---|
System.String |
VirtualHostName
Gets or sets the virtual host name defined for this instance.
This is typically the way other instance would find this instance by using the virtual host name. Think of this as similar to the fully qualified domain name, that the users of your services will need to find this instance. Configuration property: eureka:instance:vipAddress
Declaration
string VirtualHostName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Edit this page View SourceGetHostName(Boolean)
Gets the hostname associated with this instance. This is the exact name that would be used by other instances to make calls.
Declaration
string GetHostName(bool refresh)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | refresh | refresh hostname |
Returns
Type | Description |
---|---|
System.String | hostname |