Class Configuration
Namespace: Consul
Assembly: Consul.dll
public class Configuration : IConfigurationEndpoint
Inheritance
Implements
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
Write Options
configurationEntry
TConfig
The configuration entry
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
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
Write Options
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
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
Query Options
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
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
Query Options
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
Cancellation Token
Returns
Task <QueryResult <List <TConfig>>>
A list of config entries
Type Parameters
TConfig