Class RemoteConfigurationOptions
- Namespace
- Quilt4Net.Toolkit
- Assembly
- Quilt4Net.Toolkit.dll
public record RemoteConfigurationOptions : IEquatable<RemoteConfigurationOptions>
- Inheritance
-
RemoteConfigurationOptions
- Implements
- Inherited Members
Properties
ApiKey
public string ApiKey { get; set; }
Property Value
Application
Application name used when a read passes application: null (i.e. "this application").
When null (the default), the entry assembly name is used. Set to an empty string to resolve
such calls to shared (cross-application) values, or to a specific name to impersonate another application.
Note: the read methods' own application parameter defaults to an empty string (shared), so
this option only takes effect for calls that explicitly pass null.
public string Application { get; set; }
Property Value
FailureCacheDuration
How long to stop calling for a key after a failed call — a timeout, a transport error or a non-success status. Doubles per consecutive failure up to MaxFailureCacheDuration and resets on the first success. Default is 5 seconds.
public TimeSpan FailureCacheDuration { get; set; }
Property Value
Remarks
There was no such setting before: configuration hard-coded a private 10-minute constant and then shadowed even that with the last successful response's TTL, so a toggle whose refreshes kept timing out was pinned to its fallback for a full lifetime per attempt — two days, in the case that produced issue #174. A caller reading the toggle could not tell that apart from a server that genuinely returned the fallback value.
HttpTimeout
Timeout for HTTP calls to the Quilt4Net server. Default is 5 seconds. When a stale cached value exists and StaleWhileRevalidate is enabled, the caller gets the stale value immediately and the refresh happens in the background, so this timeout only blocks when no cached value exists. When StaleWhileRevalidate is disabled, an expired entry is refreshed synchronously and this timeout applies to that call.
public TimeSpan HttpTimeout { get; set; }
Property Value
MaxFailureCacheDuration
Ceiling for the consecutive-failure back-off described on FailureCacheDuration. Default is 5 minutes.
public TimeSpan MaxFailureCacheDuration { get; set; }
Property Value
MetricsEnabled
When true (default), configuration resolutions are published as metrics on the
Quilt4Net.Toolkit.Configuration meter — a resolution counter and a duration histogram,
both tagged by source and key, so "which toggle is falling back" is one query.
public bool MetricsEnabled { get; set; }
Property Value
Remarks
The key is a tag here where it deliberately is not for content: a host has a handful of toggles, not hundreds of content keys, so the cardinality is bounded and the question is exactly the one an operator asks.
Quilt4NetAddress
Address to the Quilt4Net server.
Default is https://quilt4net.com/. Defaulted on the type so an unbound
IOptions<RemoteConfigurationOptions> still carries a usable URL.
public string Quilt4NetAddress { get; set; }
Property Value
StaleWhileRevalidate
When true (default), an expired cache entry is returned immediately and refreshed in the background (stale-while-revalidate) — fast, but the caller may see one slightly stale value. When false, an expired entry is refreshed synchronously so the caller always gets a fresh value (subject to HttpTimeout), at the cost of blocking on the refresh.
public bool StaleWhileRevalidate { get; set; }
Property Value
Ttl
public TimeSpan? Ttl { get; set; }