Class ConsulDiscoveryOptions
Configuration options for the ConsulDiscoveryClient
public class ConsulDiscoveryOptions
- Inheritance
-
ConsulDiscoveryOptions
- Inherited Members
Constructors
ConsulDiscoveryOptions()
public ConsulDiscoveryOptions()
Fields
CONSUL_DISCOVERY_CONFIGURATION_PREFIX
public const string CONSUL_DISCOVERY_CONFIGURATION_PREFIX = "consul:discovery"
Field Value
Properties
CacheTTL
Gets or sets the time in seconds that service instance cache records should remain active
public int CacheTTL { get; set; }
Property Value
DefaultQueryTag
Gets or sets Tag to query for in service list if one is not listed in serverListQueryTags.
public string DefaultQueryTag { get; set; }
Property Value
DefaultZoneMetadataName
Gets or sets the metadata tag name of the zone
public string DefaultZoneMetadataName { get; set; }
Property Value
Deregister
Gets or sets a value indicating whether gets or sets Deregister automatic de-registration of service in consul.
public bool Deregister { get; set; }
Property Value
Enabled
Gets or sets a value indicating whether Consul Discovery client is enabled
public bool Enabled { get; set; }
Property Value
FailFast
Gets or sets a value indicating whether gets or sets FailFast Throw exceptions during service registration if true, otherwise, log warnings(defaults to true).
public bool FailFast { get; set; }
Property Value
HealthCheckCriticalTimeout
Gets or sets Timeout to deregister services critical for longer than timeout(e.g. 30m). Requires consul version 7.x or higher.
public string HealthCheckCriticalTimeout { get; set; }
Property Value
HealthCheckInterval
Gets or sets How often to perform the health check (e.g. 10s), defaults to 10s.
public string HealthCheckInterval { get; set; }
Property Value
HealthCheckPath
Gets or sets Alternate server path to invoke for health checking
public string HealthCheckPath { get; set; }
Property Value
HealthCheckTimeout
Gets or sets Timeout for health check (e.g. 10s).
public string HealthCheckTimeout { get; set; }
Property Value
HealthCheckTlsSkipVerify
Gets or sets a value indicating whether health check verifies TLS
public bool HealthCheckTlsSkipVerify { get; set; }
Property Value
HealthCheckUrl
Gets or sets Custom health check url to override default
public string HealthCheckUrl { get; set; }
Property Value
Heartbeat
Gets or sets values related to Heartbeat
public ConsulHeartbeatOptions Heartbeat { get; set; }
Property Value
HostName
Gets or sets Hostname to use when accessing server
public string HostName { get; set; }
Property Value
InstanceGroup
Gets or sets the instance groupt to use during registration
public string InstanceGroup { get; set; }
Property Value
InstanceId
Gets or sets Unique service instance id
public string InstanceId { get; set; }
Property Value
InstanceZone
Gets or sets the instance zone to use during registration
public string InstanceZone { get; set; }
Property Value
IpAddress
Gets or sets IP address to use when accessing service (must also set preferIpAddress to use)
public string IpAddress { get; set; }
Property Value
IsHeartBeatEnabled
Gets a value indicating whether heart beat is enabled
public bool IsHeartBeatEnabled { get; }
Property Value
IsRetryEnabled
Gets a value indicating whether retry is enabled
public bool IsRetryEnabled { get; }
Property Value
Metadata
Gets or sets Metadata to use when registering service
public IDictionary<string, string> Metadata { get; set; }
Property Value
NetUtils
public InetUtils NetUtils { get; set; }
Property Value
Port
Gets or sets Port to register the service under
public int Port { get; set; }
Property Value
PreferAgentAddress
Gets or sets a value indicating whether to use agent address or hostname
public bool PreferAgentAddress { get; set; }
Property Value
PreferIpAddress
Gets or sets a value indicating whether gets or sets Use ip address rather than hostname during registration
public bool PreferIpAddress { get; set; }
Property Value
QueryPassing
Gets or sets a value indicating whether gets or sets Add the 'passing` parameter to /v1/health/service/serviceName. This pushes health check passing to the server.
public bool QueryPassing { get; set; }
Property Value
Register
Gets or sets a value indicating whether gets or sets Register as a service in consul.
public bool Register { get; set; }
Property Value
RegisterHealthCheck
Gets or sets a value indicating whether gets or sets RegisterHealthCheck in consul. Useful during development of a service.
public bool RegisterHealthCheck { get; set; }
Property Value
Retry
Gets or sets values related to Retrying requests
public ConsulRetryOptions Retry { get; set; }
Property Value
Scheme
Gets or sets Whether to register an http or https service
public string Scheme { get; set; }
Property Value
ServiceName
Gets or sets Service name
public string ServiceName { get; set; }
Property Value
Tags
Gets or sets Tags to use when registering service
public IList<string> Tags { get; set; }
Property Value
TagsAsMetadata
Gets or sets a value indicating whether use tags as metadata, defaults to true
public bool TagsAsMetadata { get; set; }
Property Value
UseAspNetCoreUrls
Gets or sets a value indicating whether to register a Url from ASP.NET Core configuration
public bool UseAspNetCoreUrls { get; set; }
Property Value
UseNetUtils
public bool UseNetUtils { get; set; }
Property Value
Methods
ApplyConfigUrls(List<Uri>, string)
Set properties from addresses found in configuration
public void ApplyConfigUrls(List<Uri> addresses, string wildcard_hostname)
Parameters
addresses
List<Uri>A list of addresses the application is listening on
wildcard_hostname
stringString representation of a wildcard hostname
ApplyNetUtils()
public void ApplyNetUtils()