Skip to main content

Class Configuration

Namespace: Consul
Assembly: Consul.dll

public class Configuration : IConfigurationEndpoint

Inheritance

objectConfiguration

Implements

IConfigurationEndpoint

Inherited Members

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

Methods

ApplyConfig<TConfig>(WriteOptions, TConfig, CancellationToken)

This creates or updates the given config entry.

public Task<WriteResult> ApplyConfig<TConfig>(WriteOptions q, TConfig configurationEntry, CancellationToken ct = default) where TConfig : IConfigurationEntry

Parameters

q WriteOptions

Write Options

configurationEntry TConfig

The configuration entry

ct CancellationToken

The cancellation token

Returns

Task <WriteResult >

An empty write result

Type Parameters

TConfig

ApplyConfig<TConfig>(TConfig, CancellationToken)

This creates or updates the given config entry.

public Task<WriteResult> ApplyConfig<TConfig>(TConfig configurationEntry, CancellationToken ct = default) where TConfig : IConfigurationEntry

Parameters

configurationEntry TConfig

The configuration entry

ct CancellationToken

The cancellation token

Returns

Task <WriteResult >

An empty write result

Type Parameters

TConfig

DeleteConfig(string, string, WriteOptions, CancellationToken)

This Deletes the given config entry.

public Task<WriteResult> DeleteConfig(string kind, string name, WriteOptions q, CancellationToken ct = default)

Parameters

kind string

The kind of config entry

name string

The name of config entry

q WriteOptions

Write Options

ct CancellationToken

Cancellation Token

Returns

Task <WriteResult >

A Write Result

DeleteConfig(string, string, CancellationToken)

This Deletes the given config entry.

public Task<WriteResult> DeleteConfig(string kind, string name, CancellationToken ct = default)

Parameters

kind string

The kind of config entry

name string

The name of config entry

ct CancellationToken

Cancellation Token

Returns

Task <WriteResult >

A config entry

GetConfig<TConfig>(string, string, QueryOptions, CancellationToken)

This Retrieves the given config entry.

public Task<QueryResult<TConfig>> GetConfig<TConfig>(string kind, string name, QueryOptions q, CancellationToken ct = default) where TConfig : IConfigurationEntry

Parameters

kind string

The kind of config entry

name string

The name of config entry

q QueryOptions

Query Options

ct CancellationToken

Cancellation Token

Returns

Task <QueryResult <TConfig>>

A config entry

Type Parameters

TConfig

GetConfig<TConfig>(string, string, CancellationToken)

This Retrieves the given config entry.

public Task<QueryResult<TConfig>> GetConfig<TConfig>(string kind, string name, CancellationToken ct = default) where TConfig : IConfigurationEntry

Parameters

kind string

The kind of config entry

name string

The name of config entry

ct CancellationToken

Cancellation Token

Returns

Task <QueryResult <TConfig>>

A config entry

Type Parameters

TConfig

ListConfig<TConfig>(string, QueryOptions, CancellationToken)

This Retrieves the list of config for an entry kind.

public Task<QueryResult<List<TConfig>>> ListConfig<TConfig>(string kind, QueryOptions q, CancellationToken ct = default) where TConfig : IConfigurationEntry

Parameters

kind string

The kind of config entry

q QueryOptions

Query Options

ct CancellationToken

Cancellation Token

Returns

Task <QueryResult <List <TConfig>>>

A config entry

Type Parameters

TConfig

ListConfig<TConfig>(string, CancellationToken)

This Retrieves the list of config for an entry kind.

public Task<QueryResult<List<TConfig>>> ListConfig<TConfig>(string kind, CancellationToken ct = default) where TConfig : IConfigurationEntry

Parameters

kind string

The kind of config entry

ct CancellationToken

Cancellation Token

Returns

Task <QueryResult <List <TConfig>>>

A list of config entries

Type Parameters

TConfig

  • Methods
    • ApplyConfig<TConfig>(WriteOptions, TConfig, CancellationToken)
    • ApplyConfig<TConfig>(TConfig, CancellationToken)
    • DeleteConfig(string, string, WriteOptions, CancellationToken)
    • DeleteConfig(string, string, CancellationToken)
    • GetConfig<TConfig>(string, string, QueryOptions, CancellationToken)
    • GetConfig<TConfig>(string, string, CancellationToken)
    • ListConfig<TConfig>(string, QueryOptions, CancellationToken)
    • ListConfig<TConfig>(string, CancellationToken)