Expand description
Multi-tenancy support for RingKernel.
This module provides tenant isolation, resource quotas, and tenant-aware operations for multi-tenant deployments.
§Example
ⓘ
use ringkernel_core::tenancy::{TenantContext, TenantRegistry, ResourceQuota};
let registry = TenantRegistry::new()
.with_tenant("tenant_a", ResourceQuota::new()
.with_max_kernels(100)
.with_max_gpu_memory_mb(8192)
.with_max_messages_per_sec(10000))
.with_tenant("tenant_b", ResourceQuota::new()
.with_max_kernels(50)
.with_max_gpu_memory_mb(4096));
let ctx = TenantContext::new("tenant_a");
if let Some(quota) = registry.get_quota(&ctx.tenant_id) {
if quota.check_kernel_limit(current_kernels) {
// Launch kernel
}
}Structs§
- Quota
Utilization - Quota utilization percentages.
- Resource
Quota - Resource quotas for a tenant.
- Resource
Usage - Current resource usage for a tenant.
- Tenant
Context - Context for tenant-scoped operations.
- Tenant
Registry - Registry for managing tenants.
Enums§
- Tenant
Error - Error type for tenant operations.
Type Aliases§
- Tenant
Result - Result type for tenant operations.