Class EurekaInstanceOptions
- Namespace
- Steeltoe.Discovery.Eureka.Configuration
- Assembly
- Steeltoe.Discovery.Eureka.dll
public sealed class EurekaInstanceOptions
- Inheritance
-
EurekaInstanceOptions
- Inherited Members
Properties
AppGroupName
Gets or sets the name of the application group to be registered with Eureka.
[ConfigurationKeyName("AppGroup")]
public string? AppGroupName { get; set; }
Property Value
AppName
Gets or sets the name of the application to be registered with Eureka.
public string? AppName { get; set; }
Property Value
AutoScalingGroupName
Gets or sets the AWS auto-scaling group name associated with the 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.
[ConfigurationKeyName("AsgName")]
public string? AutoScalingGroupName { get; set; }
Property Value
DataCenterInfo
Gets the data center the instance is deployed to. This information is used to get some AWS-specific instance information if the instance is deployed in AWS.
public DataCenterInfo DataCenterInfo { get; }
Property Value
HealthCheckUrl
Gets or sets the absolute URL for health checks of the instance. Users can provide the HealthCheckUrlPath if the health check endpoint resides in the same instance talking to Eureka. Otherwise, in case 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.
public string? HealthCheckUrl { get; set; }
Property Value
HealthCheckUrlPath
Gets or sets the relative path to the health check endpoint of the instance. The health check URL is then constructed out of the HostName and the type of communication - secure or non-secure, 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. Default value: /health.
public string? HealthCheckUrlPath { get; set; }
Property Value
HomePageUrl
Gets or sets the absolute URL to the home page for the instance. Users can provide the HomePageUrlPath if the home page resides in the same instance talking to Eureka. Otherwise, in case 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 to find out about the status of the instance. Users can provide a simple HTML page indicating what the current status of the instance is. The full URL should follow the format: http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime.
public string? HomePageUrl { get; set; }
Property Value
HomePageUrlPath
Gets or sets the relative path to the home page URL for the instance. The home page URL is then constructed out of the HostName and the type of communication - secure or non-secure, as specified in SecurePort and NonSecurePort. It is normally used for informational purposes for other services to use it as a landing page. Default value: /.
public string? HomePageUrlPath { get; set; }
Property Value
HostName
Gets or sets the hostname on which the instance is registered.
public string? HostName { get; set; }
Property Value
IPAddress
Gets or sets the IP address on which the instance is registered.
public string? IPAddress { get; set; }
Property Value
InstanceId
Gets or sets the unique ID (within the scope of the app name) of the instance to be registered with Eureka.
public string? InstanceId { get; set; }
Property Value
IsInstanceEnabledOnInit
Gets or sets a value indicating whether the instance should take traffic as soon as it is registered. Default value: true.
[ConfigurationKeyName("InstanceEnabledOnInit")]
public bool IsInstanceEnabledOnInit { get; set; }
Property Value
Remarks
When set to false
, call UpdateInstance(InstanceStatus?, InstanceStatus?, IReadOnlyDictionary<string, string?>?) after initialization to mark the instance as up.
IsNonSecurePortEnabled
Gets or sets a value indicating whether the non-secure port should be enabled.
[ConfigurationKeyName("NonSecurePortEnabled")]
public bool IsNonSecurePortEnabled { get; set; }
Property Value
IsSecurePortEnabled
Gets or sets a value indicating whether the secure port should be enabled.
[ConfigurationKeyName("SecurePortEnabled")]
public bool IsSecurePortEnabled { get; set; }
Property Value
LeaseExpirationDurationInSeconds
Gets or sets the time (in seconds) that the Eureka server waits since it received the last heartbeat before it marks the instance as down and thereby disallowing traffic to the instance. Setting this value too high could mean that traffic is routed to the instance even when the instance is not alive anymore. Setting this value too low could mean the instance may be taken out of traffic because of temporary network glitches. This value must be higher than LeaseRenewalIntervalInSeconds. Default value: 90.
public int LeaseExpirationDurationInSeconds { get; set; }
Property Value
LeaseRenewalIntervalInSeconds
Gets or sets how often (in seconds) the client sends heartbeats to Eureka to indicate that it is still alive. If the heartbeats are not received for
the period specified in LeaseExpirationDurationInSeconds, Eureka server will remove the instance from its view, thereby disallowing
traffic to the instance. Note that the instance could still not take traffic if CheckEnabled is true
, which
decides to make itself unavailable. Default value: 30.
public int LeaseRenewalIntervalInSeconds { get; set; }
Property Value
MetadataMap
Gets the name/value pairs associated with the instance. This information is sent to Eureka server and can be used by other instances.
public IDictionary<string, string?> MetadataMap { get; }
Property Value
NonSecurePort
Gets or sets the non-secure port number on which the instance should receive traffic.
[ConfigurationKeyName("Port")]
public int? NonSecurePort { get; set; }
Property Value
- int?
PreferIPAddress
Gets or sets a value indicating whether to register with IPAddress instead of HostName. Default value: false.
public bool PreferIPAddress { get; set; }
Property Value
RegistrationMethod
Gets or sets how to register on Cloud Foundry. Can be "route", "direct", or "hostname".
public string? RegistrationMethod { get; set; }
Property Value
SecureHealthCheckUrl
Gets or sets the secure absolute URL for health checks of the instance. Users can provide the HealthCheckUrlPath if the health check endpoint resides in the same instance talking to Eureka. Otherwise, in case 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: https://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime.
public string? SecureHealthCheckUrl { get; set; }
Property Value
SecurePort
Gets or sets the secure port on which the instance should receive traffic.
public int? SecurePort { get; set; }
Property Value
- int?
SecureVipAddress
Gets or sets the comma-separated list of secure VIP (Virtual Internet Protocol) addresses for the instance.
public string? SecureVipAddress { get; set; }
Property Value
Remarks
When using service discovery, secure VIP addresses are resolved into real addresses on outgoing HTTP requests.
StatusPageUrl
Gets or sets the absolute URL to the status page for the instance. Users can provide the StatusPageUrlPath if the status page resides in the same instance talking to Eureka. Otherwise, in case 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 to find out about the status of the instance. Users can provide a simple HTML page indicating what the current status of the instance is. The full URL should follow the format: http://${eureka.hostname}:7001/ where the value ${eureka.hostname} is replaced at runtime.
public string? StatusPageUrl { get; set; }
Property Value
StatusPageUrlPath
Gets or sets the relative path to the status page for the instance. The status page URL is then constructed out of the HostName and the type of communication - secure or non-secure, as specified in SecurePort and NonSecurePort. It is normally used for informational purposes for other services to find out about the status of the instance. Users can provide a simple HTML page indicating what the current status of the instance is. Default value: /info.
public string? StatusPageUrlPath { get; set; }
Property Value
UseNetworkInterfaces
Gets or sets a value indicating whether GetAllNetworkInterfaces() is used to determine IPAddress and HostName. Default value: false.
public bool UseNetworkInterfaces { get; set; }
Property Value
VipAddress
Gets or sets the comma-separated list of VIP (Virtual Internet Protocol) addresses for the instance.
public string? VipAddress { get; set; }
Property Value
Remarks
When using service discovery, VIP addresses are resolved into real addresses on outgoing HTTP requests.