Skip to main content

Interface IConsulClient

Namespace: Consul
Assembly: Consul.dll

The interface for the Consul Client

public interface IConsulClient : IDisposable

Implements

IDisposable

Properties

ACL

IACLEndpoint ACL { get; }

Property Value

IACLEndpoint

Agent

IAgentEndpoint Agent { get; }

Property Value

IAgentEndpoint

Catalog

ICatalogEndpoint Catalog { get; }

Property Value

ICatalogEndpoint

Configuration

IConfigurationEndpoint Configuration { get; }

Property Value

IConfigurationEndpoint

Coordinate

ICoordinateEndpoint Coordinate { get; }

Property Value

ICoordinateEndpoint

DiscoveryChain

IDiscoveryChainEndpoint DiscoveryChain { get; }

Property Value

IDiscoveryChainEndpoint

Event

IEventEndpoint Event { get; }

Property Value

IEventEndpoint

Health

IHealthEndpoint Health { get; }

Property Value

IHealthEndpoint

KV

IKVEndpoint KV { get; }

Property Value

IKVEndpoint

Operator

IOperatorEndpoint Operator { get; }

Property Value

IOperatorEndpoint

Policy

IPolicyEndpoint Policy { get; }

Property Value

IPolicyEndpoint

PreparedQuery

IPreparedQueryEndpoint PreparedQuery { get; }

Property Value

IPreparedQueryEndpoint

Raw

IRawEndpoint Raw { get; }

Property Value

IRawEndpoint

Role

IRoleEndpoint Role { get; }

Property Value

IRoleEndpoint

Session

ISessionEndpoint Session { get; }

Property Value

ISessionEndpoint

Snapshot

ISnapshotEndpoint Snapshot { get; }

Property Value

ISnapshotEndpoint

Status

IStatusEndpoint Status { get; }

Property Value

IStatusEndpoint

Token

ITokenEndpoint Token { get; }

Property Value

ITokenEndpoint

Methods

AcquireLock(LockOptions, CancellationToken)

Task<IDistributedLock> AcquireLock(LockOptions opts, CancellationToken ct = default)

Parameters

opts LockOptions

ct CancellationToken

Returns

Task <IDistributedLock >

AcquireLock(string, CancellationToken)

Task<IDistributedLock> AcquireLock(string key, CancellationToken ct = default)

Parameters

key string

ct CancellationToken

Returns

Task <IDistributedLock >

AcquireSemaphore(SemaphoreOptions, CancellationToken)

Task<IDistributedSemaphore> AcquireSemaphore(SemaphoreOptions opts, CancellationToken ct = default)

Parameters

opts SemaphoreOptions

ct CancellationToken

Returns

Task <IDistributedSemaphore >

AcquireSemaphore(string, int, CancellationToken)

Task<IDistributedSemaphore> AcquireSemaphore(string prefix, int limit, CancellationToken ct = default)

Parameters

prefix string

limit int

ct CancellationToken

Returns

Task <IDistributedSemaphore >

CreateLock(LockOptions)

IDistributedLock CreateLock(LockOptions opts)

Parameters

opts LockOptions

Returns

IDistributedLock

CreateLock(string)

IDistributedLock CreateLock(string key)

Parameters

key string

Returns

IDistributedLock

ExecuteInSemaphore(SemaphoreOptions, Action, CancellationToken)

Task ExecuteInSemaphore(SemaphoreOptions opts, Action a, CancellationToken ct = default)

Parameters

opts SemaphoreOptions

a Action

ct CancellationToken

Returns

Task

ExecuteInSemaphore(string, int, Action, CancellationToken)

Task ExecuteInSemaphore(string prefix, int limit, Action a, CancellationToken ct = default)

Parameters

prefix string

limit int

a Action

ct CancellationToken

Returns

Task

ExecuteLocked(LockOptions, Action, CancellationToken)

Task ExecuteLocked(LockOptions opts, Action action, CancellationToken ct = default)

Parameters

opts LockOptions

action Action

ct CancellationToken

Returns

Task

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

ct CancellationToken

action Action

Returns

Task

ExecuteLocked(string, Action, CancellationToken)

Task ExecuteLocked(string key, Action action, CancellationToken ct = default)

Parameters

key string

action Action

ct CancellationToken

Returns

Task

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

ct CancellationToken

action Action

Returns

Task

Semaphore(SemaphoreOptions)

IDistributedSemaphore Semaphore(SemaphoreOptions opts)

Parameters

opts SemaphoreOptions

Returns

IDistributedSemaphore

Semaphore(string, int)

IDistributedSemaphore Semaphore(string prefix, int limit)

Parameters

prefix string

limit int

Returns

IDistributedSemaphore

  • Properties
    • ACL
    • Agent
    • Catalog
    • Configuration
    • Coordinate
    • DiscoveryChain
    • Event
    • Health
    • KV
    • Operator
    • Policy
    • PreparedQuery
    • Raw
    • Role
    • Session
    • Snapshot
    • Status
    • Token
  • Methods
    • AcquireLock(LockOptions, CancellationToken)
    • AcquireLock(string, CancellationToken)
    • AcquireSemaphore(SemaphoreOptions, CancellationToken)
    • AcquireSemaphore(string, int, CancellationToken)
    • CreateLock(LockOptions)
    • CreateLock(string)
    • ExecuteInSemaphore(SemaphoreOptions, Action, CancellationToken)
    • ExecuteInSemaphore(string, int, Action, CancellationToken)
    • ExecuteLocked(LockOptions, Action, CancellationToken)
    • ExecuteLocked(LockOptions, CancellationToken, Action)
    • ExecuteLocked(string, Action, CancellationToken)
    • ExecuteLocked(string, CancellationToken, Action)
    • Semaphore(SemaphoreOptions)
    • Semaphore(string, int)