v0.2.1-pre.004
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// file: crates/ksp-onchain-transport-lib/src/settings.rs
|
||||
// version: 3
|
||||
// version: 4
|
||||
|
||||
/// Runtime HTTP endpoint URL owned by Transport.
|
||||
///
|
||||
@@ -156,7 +156,10 @@ pub struct HttpRoleLimits {
|
||||
}
|
||||
|
||||
impl HttpRoleLimits {
|
||||
/// Creates explicit role limits. `None` leaves the corresponding limit unbounded by this KSP transport layer.
|
||||
/// Creates explicit role limits.
|
||||
///
|
||||
/// When RPS is configured and burst capacity is absent, runtime burst defaults to one second of RPS capacity. An absent concurrency limit is
|
||||
/// unbounded by this KSP transport layer. An absent rate-limit cooldown uses the Transport runtime fallback cooldown.
|
||||
#[must_use]
|
||||
pub const fn new(
|
||||
requests_per_second: std::option::Option<std::num::NonZeroU32>,
|
||||
@@ -173,7 +176,7 @@ impl HttpRoleLimits {
|
||||
return self.requests_per_second;
|
||||
}
|
||||
|
||||
/// Returns the configured token-bucket burst capacity.
|
||||
/// Returns the configured token-bucket burst capacity. `None` means the runtime derives capacity from configured RPS.
|
||||
#[must_use]
|
||||
pub const fn burst_capacity(&self) -> std::option::Option<std::num::NonZeroU32> {
|
||||
return self.burst_capacity;
|
||||
@@ -185,7 +188,7 @@ impl HttpRoleLimits {
|
||||
return self.max_concurrent_requests;
|
||||
}
|
||||
|
||||
/// Returns the configured cooldown applied after rate limiting.
|
||||
/// Returns the configured cooldown applied after rate limiting. `None` delegates to the Transport runtime fallback cooldown.
|
||||
#[must_use]
|
||||
pub const fn pause_after_rate_limit(&self) -> std::option::Option<std::time::Duration> {
|
||||
return self.pause_after_rate_limit;
|
||||
|
||||
Reference in New Issue
Block a user