Class RestAdvancedConfiguration
- Namespace
- DisCatSharp
- Assembly
- DisCatSharp.dll
Advanced configuration for Discord REST client tuning.
public sealed class RestAdvancedConfiguration
- Inheritance
-
RestAdvancedConfiguration
- Inherited Members
Remarks
Properties in this class control low-level REST behavior such as queue timeouts, retry limits, and rate-limit buffers. Additional knobs will be added here in later phases.
Constructors
- RestAdvancedConfiguration()
Creates a new REST advanced configuration with default values.
- RestAdvancedConfiguration(RestAdvancedConfiguration)
Creates a clone of another REST advanced configuration.
Properties
- CircuitBreakerResetTimeout
Gets or sets the duration after which a tripped circuit breaker transitions to half-open, allowing a single probe request through.
- CircuitBreakerThreshold
Gets or sets the number of consecutive failures on a single bucket before the circuit breaker opens. When open, new requests to that bucket are immediately failed without sending HTTP requests.
- MaxQueueDepthPerBucket
Gets or sets the maximum number of requests that can be queued per bucket. When the limit is reached, new requests are immediately failed with RestQueueFullException.
- MaxRetries
Gets or sets the maximum number of automatic retries for a request that receives a retryable response. Applies to rate-limit responses (429) and transient server errors (500, 502, 503, 504). Server errors use exponential backoff (1s, 2s, 4s, …); rate limits use the server-provided Retry-After.
- PreemptiveRatelimitBuffer
Gets or sets the safety buffer added to preemptive rate-limit timing. This margin extends the preemptive wait slightly past the server-advertised reset boundary, absorbing clock drift and network jitter to prevent real 429 responses at bucket edges.
- QueueTimeout
Gets or sets the maximum time a request may wait in a bucket queue before being failed with a RestQueueTimeoutException.
- QueueWarningThreshold
Gets or sets the duration after which a warning log is emitted for a queued request that has not yet started.
- RetryTransientErrors
Gets or sets whether transient HTTP errors (DNS failures, socket errors, connection timeouts) should be retried with exponential backoff, up to MaxRetries.