Struct ResourceQuota
pub struct ResourceQuota {
pub max_kernels: Option<u64>,
pub max_gpu_memory_mb: Option<u64>,
pub max_messages_per_sec: Option<u64>,
pub max_k2k_endpoints: Option<u64>,
pub max_pubsub_subscriptions: Option<u64>,
pub max_checkpoint_storage_mb: Option<u64>,
pub max_cpu_time_per_hour: Option<u64>,
pub max_api_requests_per_min: Option<u64>,
}Expand description
Resource quotas for a tenant.
Fields§
§max_kernels: Option<u64>Maximum number of concurrent kernels.
max_gpu_memory_mb: Option<u64>Maximum GPU memory in megabytes.
max_messages_per_sec: Option<u64>Maximum messages per second.
max_k2k_endpoints: Option<u64>Maximum K2K endpoints.
max_pubsub_subscriptions: Option<u64>Maximum PubSub subscriptions.
max_checkpoint_storage_mb: Option<u64>Maximum checkpoint storage in megabytes.
max_cpu_time_per_hour: Option<u64>Maximum CPU time per hour (seconds).
max_api_requests_per_min: Option<u64>Maximum API requests per minute.
Implementations§
§impl ResourceQuota
impl ResourceQuota
pub fn new() -> ResourceQuota
pub fn new() -> ResourceQuota
Create a new resource quota with no limits.
pub fn unlimited() -> ResourceQuota
pub fn unlimited() -> ResourceQuota
Create an unlimited quota.
pub fn with_max_kernels(self, max: u64) -> ResourceQuota
pub fn with_max_kernels(self, max: u64) -> ResourceQuota
Set maximum kernels.
pub fn with_max_gpu_memory_mb(self, max: u64) -> ResourceQuota
pub fn with_max_gpu_memory_mb(self, max: u64) -> ResourceQuota
Set maximum GPU memory (MB).
pub fn with_max_messages_per_sec(self, max: u64) -> ResourceQuota
pub fn with_max_messages_per_sec(self, max: u64) -> ResourceQuota
Set maximum messages per second.
pub fn with_max_k2k_endpoints(self, max: u64) -> ResourceQuota
pub fn with_max_k2k_endpoints(self, max: u64) -> ResourceQuota
Set maximum K2K endpoints.
pub fn with_max_pubsub_subscriptions(self, max: u64) -> ResourceQuota
pub fn with_max_pubsub_subscriptions(self, max: u64) -> ResourceQuota
Set maximum PubSub subscriptions.
pub fn with_max_checkpoint_storage_mb(self, max: u64) -> ResourceQuota
pub fn with_max_checkpoint_storage_mb(self, max: u64) -> ResourceQuota
Set maximum checkpoint storage (MB).
pub fn with_max_cpu_time_per_hour(self, max: u64) -> ResourceQuota
pub fn with_max_cpu_time_per_hour(self, max: u64) -> ResourceQuota
Set maximum CPU time per hour (seconds).
pub fn with_max_api_requests_per_min(self, max: u64) -> ResourceQuota
pub fn with_max_api_requests_per_min(self, max: u64) -> ResourceQuota
Set maximum API requests per minute.
pub fn check_kernel_limit(&self, current: u64) -> bool
pub fn check_kernel_limit(&self, current: u64) -> bool
Check if kernel limit allows another kernel.
pub fn check_gpu_memory_limit(&self, current_mb: u64, requested_mb: u64) -> bool
pub fn check_gpu_memory_limit(&self, current_mb: u64, requested_mb: u64) -> bool
Check if GPU memory limit allows allocation.
pub fn check_message_rate(&self, current_rate: u64) -> bool
pub fn check_message_rate(&self, current_rate: u64) -> bool
Check if message rate limit allows another message.
pub fn tier_small() -> ResourceQuota
pub fn tier_small() -> ResourceQuota
Create a standard small tier quota.
pub fn tier_medium() -> ResourceQuota
pub fn tier_medium() -> ResourceQuota
Create a standard medium tier quota.
pub fn tier_large() -> ResourceQuota
pub fn tier_large() -> ResourceQuota
Create a standard large tier quota.
Trait Implementations§
§impl Clone for ResourceQuota
impl Clone for ResourceQuota
§fn clone(&self) -> ResourceQuota
fn clone(&self) -> ResourceQuota
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for ResourceQuota
impl Debug for ResourceQuota
§impl Default for ResourceQuota
impl Default for ResourceQuota
§fn default() -> ResourceQuota
fn default() -> ResourceQuota
Auto Trait Implementations§
impl Freeze for ResourceQuota
impl RefUnwindSafe for ResourceQuota
impl Send for ResourceQuota
impl Sync for ResourceQuota
impl Unpin for ResourceQuota
impl UnwindSafe for ResourceQuota
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
§fn deserialize(
&self,
deserializer: &mut D,
) -> Result<With<T, W>, <D as Fallible>::Error>
fn deserialize( &self, deserializer: &mut D, ) -> Result<With<T, W>, <D as Fallible>::Error>
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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