Skip to main content

Class ClusterPeering

Namespace: Consul
Assembly: Consul.dll

ClusterPeering is used to interact with Cluster Peering in Consul through the API

public class ClusterPeering : IClusterPeeringEndpoint

Inheritance

objectClusterPeering

Implements

IClusterPeeringEndpoint

Inherited Members

object.Equals(object) , object.Equals(object, object) , object.GetHashCode() , object.GetType() , object.MemberwiseClone() , object.ReferenceEquals(object, object) , object.ToString()

Methods

DeletePeering(string, CancellationToken)

DeletePeering is used to delete a specific connection by its name

public Task<WriteResult> DeletePeering(string name, CancellationToken cancellationToken)

Parameters

name string

cancellationToken CancellationToken

Returns

Task <WriteResult >

A specific connection instance.

DeletePeering(string, WriteOptions, CancellationToken)

DeletePeering is used to delete a specific connection by its name

public Task<WriteResult> DeletePeering(string name, WriteOptions options, CancellationToken cancellationToken)

Parameters

name string

options WriteOptions

cancellationToken CancellationToken

Returns

Task <WriteResult >

A specific connection instance.

GenerateToken(ClusterPeeringTokenEntry, CancellationToken)

Generates a Peering Token in Consul

public Task<WriteResult<ClusterPeeringTokenResponse>> GenerateToken(ClusterPeeringTokenEntry tokenEntry, CancellationToken ct = default)

Parameters

tokenEntry ClusterPeeringTokenEntry

The new Cluster Peering Entry

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <ClusterPeeringTokenResponse >>

A write result containing the created ACL AuthMethod

GenerateToken(ClusterPeeringTokenEntry, WriteOptions, CancellationToken)

Generates a Peering Token in Consul

public Task<WriteResult<ClusterPeeringTokenResponse>> GenerateToken(ClusterPeeringTokenEntry tokenEntry, WriteOptions options, CancellationToken ct = default)

Parameters

tokenEntry ClusterPeeringTokenEntry

A new Cluster Peering Entry

options WriteOptions

ct CancellationToken

Cancellation token for long poll request. If set, OperationCanceledException will be thrown if the request is cancelled before completing

Returns

Task <WriteResult <ClusterPeeringTokenResponse >>

A new Binding Rule

GetPeering(string, CancellationToken)

GetPeering is used to query a specific connection by its name

public Task<QueryResult<ClusterPeeringStatus>> GetPeering(string name, CancellationToken cancellationToken)

Parameters

name string

cancellationToken CancellationToken

Returns

Task <QueryResult <ClusterPeeringStatus >>

A specific connection instance.

GetPeering(string, QueryOptions, CancellationToken)

GetPeering is used to query a specific connection by its name

public Task<QueryResult<ClusterPeeringStatus>> GetPeering(string name, QueryOptions options, CancellationToken cancellationToken)

Parameters

name string

options QueryOptions

cancellationToken CancellationToken

Returns

Task <QueryResult <ClusterPeeringStatus >>

A specific connection instance.

ListPeerings(CancellationToken)

ListPeerings is used to list peering connections

public Task<QueryResult<ClusterPeeringStatus[]>> ListPeerings(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task <QueryResult <ClusterPeeringStatus []>>

ListPeerings(QueryOptions, CancellationToken)

ListPeerings is used to list peering connections

public Task<QueryResult<ClusterPeeringStatus[]>> ListPeerings(QueryOptions q, CancellationToken cancellationToken = default)

Parameters

q QueryOptions

cancellationToken CancellationToken

Returns

Task <QueryResult <ClusterPeeringStatus []>>

  • Methods
    • DeletePeering(string, CancellationToken)
    • DeletePeering(string, WriteOptions, CancellationToken)
    • GenerateToken(ClusterPeeringTokenEntry, CancellationToken)
    • GenerateToken(ClusterPeeringTokenEntry, WriteOptions, CancellationToken)
    • GetPeering(string, CancellationToken)
    • GetPeering(string, QueryOptions, CancellationToken)
    • ListPeerings(CancellationToken)
    • ListPeerings(QueryOptions, CancellationToken)