Interface IRemoteConfigurationService
- Namespace
- Quilt4Net.Toolkit.Features.FeatureToggle
- Assembly
- Quilt4Net.Toolkit.dll
Reads — and, for admin scenarios, writes — remote configuration values and feature toggles served by
Quilt4Net. Read results are cached locally with stale-while-revalidate; a failed server call falls back
to the last known value or the supplied fallback, so reads never throw.
public interface IRemoteConfigurationService
Methods
DeleteAsync(string, string, string, string)
Deletes a configuration entry. Requires a server API key carrying the config:write scope.
Task DeleteAsync(string key, string application, string environment, string instance)
Parameters
keystringConfiguration key.
applicationstringOwning application; pass an empty string for a shared entry.
environmentstringOwning environment.
instancestringOwning instance, or
null.
Returns
GetAsync()
Lists every configuration entry (feature toggles and configuration values) the calling API
key can read on the team — across all applications and environments. Intended for admin /
overview UIs (e.g. RemoteConfigurationAdmin); for per-app value lookup use
GetAsync<T>(string, T, TimeSpan?, string) instead.
Task<ConfigurationResponse[]> GetAsync()
Returns
GetAsync<T>(string, T, TimeSpan?, string)
Resolves a typed remote configuration value.
ValueTask<T> GetAsync<T>(string key, T fallback = default, TimeSpan? ttl = null, string application = "")
Parameters
keystringConfiguration key.
fallbackTValue returned when the key is unknown or the server is unreachable.
ttlTimeSpan?Optional client-requested cache lifetime. When
null, the team/server-configured default applies.applicationstringWhich application's value to read:
- Empty string (the default) — the shared, cross-application value.
null— the value for the configured Application, or the entry assembly name when that is unset (i.e. "this application").- A specific name — the value for that named application.
Returns
- ValueTask<T>
Type Parameters
GetToggleAsync(string, bool, TimeSpan?, string)
Resolves a boolean feature toggle — shorthand for GetAsync<T>(string, T, TimeSpan?, string) with T = bool.
ValueTask<bool> GetToggleAsync(string key, bool fallback = false, TimeSpan? ttl = null, string application = "")
Parameters
keystringToggle key.
fallbackboolValue returned when the key is unknown or the server is unreachable.
ttlTimeSpan?Optional client-requested cache lifetime. When
null, the team/server-configured default applies.applicationstringWhich application's toggle to read: empty string (the default) reads the shared value;
nullreads the configured application's value (or the entry assembly name); a specific name reads that application's value. See GetAsync<T>(string, T, TimeSpan?, string) for details.
Returns
SetAsync(string, string, string, string, string)
Creates or updates a configuration value. Requires a server API key carrying the config:write scope.
Task SetAsync(string key, string application, string environment, string instance, string value)
Parameters
keystringConfiguration key.
applicationstringOwning application; pass an empty string for a shared entry.
environmentstringOwning environment.
instancestringOwning instance, or
null.valuestringNew value (stored as its string representation).