Class ConsulDiscoveryOptions
- Namespace
- Steeltoe.Discovery.Consul.Configuration
- Assembly
- Steeltoe.Discovery.Consul.dll
Configuration options for ConsulDiscoveryClient.
public sealed class ConsulDiscoveryOptions
- Inheritance
-
ConsulDiscoveryOptions
- Inherited Members
Properties
DefaultQueryTag
Gets or sets the tag to filter on when querying for service instances.
public string? DefaultQueryTag { get; set; }
Property Value
DefaultZoneMetadataName
Gets or sets the metadata key name for InstanceZone.
public string? DefaultZoneMetadataName { get; set; }
Property Value
Deregister
Gets or sets a value indicating whether to de-register the running app on shutdown. Default value: true.
public bool Deregister { get; set; }
Property Value
Enabled
Gets or sets a value indicating whether to enable the Consul client. Default value: true.
public bool Enabled { get; set; }
Property Value
FailFast
Gets or sets a value indicating whether to throw an exception (instead of logging an error) if registration fails. Default value: true.
public bool FailFast { get; set; }
Property Value
HealthCheckCriticalTimeout
Gets or sets the duration after which Consul deregisters the running app when in state critical. Default value: 30m.
public string? HealthCheckCriticalTimeout { get; set; }
Property Value
Remarks
This setting only has effect when RegisterHealthCheck is true.
HealthCheckInterval
Gets or sets how often Consul should perform an HTTP health check. Default value: 10s.
public string? HealthCheckInterval { get; set; }
Property Value
Remarks
This setting only has effect when RegisterHealthCheck is true, Enabled is false and Port is greater than zero.
HealthCheckPath
Gets or sets the relative URL to the health endpoint of the running app. Default value: /actuator/health.
public string? HealthCheckPath { get; set; }
Property Value
Remarks
This setting only has effect when RegisterHealthCheck is true, Enabled is false and Port is greater than zero.
HealthCheckTimeout
Gets or sets the timeout Consul should use for an HTTP health check. Default value: 10s.
public string? HealthCheckTimeout { get; set; }
Property Value
Remarks
This setting only has effect when RegisterHealthCheck is true, Enabled is false and Port is greater than zero.
HealthCheckTlsSkipVerify
Gets or sets a value indicating whether Consul should skip TLS verification for HTTP health checks. Default value: false.
public bool HealthCheckTlsSkipVerify { get; set; }
Property Value
HealthCheckUrl
Gets or sets the absolute URL to the health endpoint of the running app (overrides HealthCheckPath).
public string? HealthCheckUrl { get; set; }
Property Value
Remarks
This setting only has effect when RegisterHealthCheck is true, Enabled is false and Port is greater than zero.
Heartbeat
Gets or sets settings related to heartbeats.
public ConsulHeartbeatOptions? Heartbeat { get; set; }
Property Value
HostName
Gets or sets the hostname to register the running app with (if PreferIPAddress is false).
public string? HostName { get; set; }
Property Value
IPAddress
Gets or sets the IP address to register the running app with (if PreferIPAddress is true).
public string? IPAddress { get; set; }
Property Value
InstanceGroup
Gets or sets the metadata "group" value to use when registering the running app.
public string? InstanceGroup { get; set; }
Property Value
InstanceId
Gets or sets the unique ID to register the running app under.
public string? InstanceId { get; set; }
Property Value
InstanceZone
Gets or sets the metadata zone value to use when registering the running app.
public string? InstanceZone { get; set; }
Property Value
Metadata
Gets metadata key/value pairs used when registering the running app.
public IDictionary<string, string> Metadata { get; }
Property Value
Port
Gets or sets the port number to register the running app with.
public int Port { get; set; }
Property Value
PreferIPAddress
Gets or sets a value indicating whether to register the running app with IP address instead of hostname. Default: false.
public bool PreferIPAddress { get; set; }
Property Value
QueryPassing
Gets or sets a value indicating whether to filter on health status 'passing' when querying for service instances. Default value: true.
public bool QueryPassing { get; set; }
Property Value
Register
Gets or sets a value indicating whether to register the running app as a service instance. Default value: true.
public bool Register { get; set; }
Property Value
RegisterHealthCheck
Gets or sets a value indicating whether to enable periodic health checking for the running app. Default value: true.
public bool RegisterHealthCheck { get; set; }
Property Value
Retry
Gets settings related to retrying requests.
public ConsulRetryOptions Retry { get; }
Property Value
Scheme
Gets or sets the scheme to register the running app with ("http" or "https").
public string? Scheme { get; set; }
Property Value
ServiceName
Gets or sets the friendly name to register the running app with.
public string? ServiceName { get; set; }
Property Value
Tags
Gets the tags used when registering the running app.
public IList<string> Tags { get; }
Property Value
UseAspNetCoreUrls
Gets or sets a value indicating whether to register with the port number ASP.NET Core is listening on. Default value: true.
This property is ignored when Port or Scheme is explicitly configured.
public bool UseAspNetCoreUrls { 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; }