Interface IConsulClient
Namespace: Consul
Assembly: Consul.dll
The interface for the Consul Client
public interface IConsulClient : IDisposable
Implements
Properties
ACL
IACLEndpoint ACL { get; }
Property Value
Agent
IAgentEndpoint Agent { get; }
Property Value
Catalog
ICatalogEndpoint Catalog { get; }
Property Value
Configuration
IConfigurationEndpoint Configuration { get; }
Property Value
Coordinate
ICoordinateEndpoint Coordinate { get; }
Property Value
DiscoveryChain
IDiscoveryChainEndpoint DiscoveryChain { get; }
Property Value
Event
IEventEndpoint Event { get; }
Property Value
Health
IHealthEndpoint Health { get; }
Property Value
KV
IKVEndpoint KV { get; }
Property Value
Operator
IOperatorEndpoint Operator { get; }
Property Value
Policy
IPolicyEndpoint Policy { get; }
Property Value
PreparedQuery
IPreparedQueryEndpoint PreparedQuery { get; }
Property Value
Raw
IRawEndpoint Raw { get; }
Property Value
Role
IRoleEndpoint Role { get; }
Property Value
Session
ISessionEndpoint Session { get; }
Property Value
Snapshot
ISnapshotEndpoint Snapshot { get; }
Property Value
Status
IStatusEndpoint Status { get; }
Property Value
Token
ITokenEndpoint Token { get; }
Property Value
Methods
AcquireLock(LockOptions, CancellationToken)
Task<IDistributedLock> AcquireLock(LockOptions opts, CancellationToken ct = default)
Parameters
opts
LockOptions
Returns
AcquireLock(string, CancellationToken)
Task<IDistributedLock> AcquireLock(string key, CancellationToken ct = default)
Parameters
key
string
Returns
AcquireSemaphore(SemaphoreOptions, CancellationToken)
Task<IDistributedSemaphore> AcquireSemaphore(SemaphoreOptions opts, CancellationToken ct = default)
Parameters
opts
SemaphoreOptions
Returns
AcquireSemaphore(string, int, CancellationToken)
Task<IDistributedSemaphore> AcquireSemaphore(string prefix, int limit, CancellationToken ct = default)
Parameters
prefix
string
limit
int
Returns
CreateLock(LockOptions)
IDistributedLock CreateLock(LockOptions opts)
Parameters
opts
LockOptions
Returns
CreateLock(string)
IDistributedLock CreateLock(string key)
Parameters
key
string
Returns
ExecuteInSemaphore(SemaphoreOptions, Action, CancellationToken)
Task ExecuteInSemaphore(SemaphoreOptions opts, Action a, CancellationToken ct = default)
Parameters
opts
SemaphoreOptions
a
Action
Returns
ExecuteInSemaphore(string, int, Action, CancellationToken)
Task ExecuteInSemaphore(string prefix, int limit, Action a, CancellationToken ct = default)
Parameters
prefix
string
limit
int
a
Action
Returns
ExecuteLocked(LockOptions, Action, CancellationToken)
Task ExecuteLocked(LockOptions opts, Action action, CancellationToken ct = default)
Parameters
opts
LockOptions
action
Action
Returns
ExecuteLocked(LockOptions, CancellationToken, Action)
[Obsolete("This method will be removed in a future release. Replace calls with the method signature ExecuteLocked(LockOptions, Action, CancellationToken)")]
Task ExecuteLocked(LockOptions opts, CancellationToken ct, Action action)
Parameters
opts
LockOptions
action
Action
Returns
ExecuteLocked(string, Action, CancellationToken)
Task ExecuteLocked(string key, Action action, CancellationToken ct = default)
Parameters
key
string
action
Action
Returns
ExecuteLocked(string, CancellationToken, Action)
[Obsolete("This method will be removed in a future release. Replace calls with the method signature ExecuteLocked(string, Action, CancellationToken)")]
Task ExecuteLocked(string key, CancellationToken ct, Action action)
Parameters
key
string
action
Action
Returns
Semaphore(SemaphoreOptions)
IDistributedSemaphore Semaphore(SemaphoreOptions opts)
Parameters
opts
SemaphoreOptions
Returns
Semaphore(string, int)
IDistributedSemaphore Semaphore(string prefix, int limit)
Parameters
prefix
string
limit
int