Class ConsulClientConfiguration
Namespace: Consul
Assembly: Consul.dll
Represents the configuration options for a Consul client.
public class ConsulClientConfiguration
Inheritance
object ← ConsulClientConfiguration
Inherited Members
object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()
Constructors
ConsulClientConfiguration()
Creates a new instance of a Consul client configuration.
public ConsulClientConfiguration()
Exceptions
An error that occured while building the configuration.
Properties
Address
The Uri to connect to the Consul agent.
public Uri Address { get; set; }
Property Value
ClientCertificate
TLS Client Certificate used to secure a connection to a Consul agent. Not supported on Mono. This is only needed if an authenticating service exists in front of Consul; Token is used for ACL authentication by Consul. This is not the same as RPC Encryption with TLS certificates.
[Obsolete("Use of ClientCertificate should be converted to adding to the HttpHandler's ClientCertificates list in the ConsulClient constructor.This property will be removed in a future release.", false)]
public X509Certificate2 ClientCertificate { set; }
Property Value
Exceptions
Setting this property will throw a PlatformNotSupportedException on Mono
Datacenter
Datacenter to provide with each request. If not provided, the default agent datacenter is used.
public string Datacenter { get; set; }
Property Value
HttpAuth
Credentials to use for access to the HTTP API. This is only needed if an authenticating service exists in front of Consul; Token is used for ACL authentication by Consul.
[Obsolete("Use of HttpAuth should be converted to setting the HttpHandler's Credential property in the ConsulClient constructorThis property will be removed in a future release.", false)]
public NetworkCredential HttpAuth { set; }
Property Value
Namespace
Namespace is the name of the namespace to send along for the request when no other Namespace is present in the QueryOptions
public string Namespace { get; set; }
Property Value
Token
Token is used to provide an ACL token which overrides the agent's default token. This ACL token is used for every request by clients created using this configuration.
public string Token { get; set; }
Property Value
WaitTime
WaitTime limits how long a Watch will block. If not provided, the agent default values will be used.
public TimeSpan? WaitTime { get; set; }
Property Value
TimeSpan ?