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§
Source§impl ResourceQuota
impl ResourceQuota
Sourcepub fn with_max_kernels(self, max: u64) -> Self
pub fn with_max_kernels(self, max: u64) -> Self
Set maximum kernels.
Sourcepub fn with_max_gpu_memory_mb(self, max: u64) -> Self
pub fn with_max_gpu_memory_mb(self, max: u64) -> Self
Set maximum GPU memory (MB).
Sourcepub fn with_max_messages_per_sec(self, max: u64) -> Self
pub fn with_max_messages_per_sec(self, max: u64) -> Self
Set maximum messages per second.
Sourcepub fn with_max_k2k_endpoints(self, max: u64) -> Self
pub fn with_max_k2k_endpoints(self, max: u64) -> Self
Set maximum K2K endpoints.
Sourcepub fn with_max_pubsub_subscriptions(self, max: u64) -> Self
pub fn with_max_pubsub_subscriptions(self, max: u64) -> Self
Set maximum PubSub subscriptions.
Sourcepub fn with_max_checkpoint_storage_mb(self, max: u64) -> Self
pub fn with_max_checkpoint_storage_mb(self, max: u64) -> Self
Set maximum checkpoint storage (MB).
Sourcepub fn with_max_cpu_time_per_hour(self, max: u64) -> Self
pub fn with_max_cpu_time_per_hour(self, max: u64) -> Self
Set maximum CPU time per hour (seconds).
Sourcepub fn with_max_api_requests_per_min(self, max: u64) -> Self
pub fn with_max_api_requests_per_min(self, max: u64) -> Self
Set maximum API requests per minute.
Sourcepub fn check_kernel_limit(&self, current: u64) -> bool
pub fn check_kernel_limit(&self, current: u64) -> bool
Check if kernel limit allows another kernel.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn tier_small() -> Self
pub fn tier_small() -> Self
Create a standard small tier quota.
Sourcepub fn tier_medium() -> Self
pub fn tier_medium() -> Self
Create a standard medium tier quota.
Sourcepub fn tier_large() -> Self
pub fn tier_large() -> Self
Create a standard large tier quota.
Trait Implementations§
Source§impl Clone for ResourceQuota
impl Clone for ResourceQuota
Source§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