Skip to main content

Module tenant

Module tenant 

Source
Expand description

K2K tenant registry, quotas, and per-engagement cost tracking.

This module implements the lower-level, per-message tenancy boundary used inside the K2K broker. It is distinct from the governance-level crate::tenancy module (which uses string tenant IDs and coarse kernel-count / memory quotas). Here, TenantId is a u64 that matches the format stamped into per-message envelopes and into GPU-side routing tables.

§Responsibilities

  • Register tenants with TenantQuota limits
  • Check quotas on kernel registration and message sends
  • Track billable GPU-seconds per (tenant_id, audit_tag) pair
  • Emit audit events for cross-tenant attempts via AuditSink

Structs§

TenantInfo
Per-tenant bookkeeping stored inside TenantRegistry.
TenantQuota
Per-tenant quota and cost tracking limits.
TenantRegistry
Registry of active tenants with per-tenant quotas and per-engagement cost accounting.

Constants§

UNSPECIFIED_TENANT
Reserved tenant ID meaning “no tenant specified” (backward-compat default).

Type Aliases§

TenantId
Stable tenant identifier as used in K2K routing tables and message envelopes.