pub struct TenantRateLimits {
pub qps_limit: u32,
pub max_connections: u32,
pub max_query_duration: Duration,
pub max_result_size: u64,
pub max_rows_per_query: u64,
pub burst_multiplier: f32,
}Expand description
Tenant-specific rate limits
Fields§
§qps_limit: u32Maximum queries per second
max_connections: u32Maximum concurrent connections
max_query_duration: DurationMaximum query duration before kill
max_result_size: u64Maximum result size (bytes)
max_rows_per_query: u64Maximum rows per query
burst_multiplier: f32Burst allowance (multiplier over qps_limit for short bursts)
Implementations§
Source§impl TenantRateLimits
impl TenantRateLimits
Sourcepub fn max_connections(self, limit: u32) -> Self
pub fn max_connections(self, limit: u32) -> Self
Set the max connections
Sourcepub fn max_query_duration(self, duration: Duration) -> Self
pub fn max_query_duration(self, duration: Duration) -> Self
Set the max query duration
Sourcepub fn burst_multiplier(self, multiplier: f32) -> Self
pub fn burst_multiplier(self, multiplier: f32) -> Self
Set the burst multiplier
Trait Implementations§
Source§impl Clone for TenantRateLimits
impl Clone for TenantRateLimits
Source§fn clone(&self) -> TenantRateLimits
fn clone(&self) -> TenantRateLimits
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TenantRateLimits
impl Debug for TenantRateLimits
Auto Trait Implementations§
impl Freeze for TenantRateLimits
impl RefUnwindSafe for TenantRateLimits
impl Send for TenantRateLimits
impl Sync for TenantRateLimits
impl Unpin for TenantRateLimits
impl UnsafeUnpin for TenantRateLimits
impl UnwindSafe for TenantRateLimits
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more