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