Skip to main content

Module k2k

Module k2k 

Source
Expand description

Kernel-to-Kernel (K2K) direct messaging.

This module provides infrastructure for direct communication between GPU kernels without host-side mediation.

§Submodules

§Multi-tenant overview

The K2KBroker implements a two-tier tenancy model:

  1. Per-kernel tenant_id — the primary security boundary. Kernels registered under different tenants cannot exchange messages; sends across the boundary return crate::error::RingKernelError::TenantMismatch.
  2. Per-message AuditTag — the observability / billing tag, carried inside every envelope alongside tenant_id. Cost tracking is per-(tenant_id, engagement_id) via tenant::TenantRegistry::track_usage.

Single-tenant deployments hit the backward-compatible fast path — see tenant::UNSPECIFIED_TENANT and K2KBroker::register.

Re-exports§

pub use audit_tag::AuditTag;
pub use tenant::TenantId;
pub use tenant::TenantInfo;
pub use tenant::TenantQuota;
pub use tenant::TenantRegistry;
pub use tenant::UNSPECIFIED_TENANT;

Modules§

audit_tag
Audit tagging for K2K messages (multi-tenant cost/audit accounting).
tenant
K2K tenant registry, quotas, and per-engagement cost tracking.

Structs§

DeliveryReceipt
Receipt for a K2K message delivery.
K2KBroker
K2K message broker with per-tenant isolation.
K2KBuilder
Builder for creating K2K infrastructure.
K2KConfig
Configuration for K2K messaging.
K2KEndpoint
K2K endpoint for a single kernel.
K2KMessage
A K2K message with routing information.
K2KMessageRegistration
Registration information for a K2K-routable message type.
K2KStats
K2K messaging statistics (aggregate across all tenants).
K2KSubBroker
Per-tenant sub-broker.
K2KTypeRegistry
Registry for discovering K2K-routable message types at runtime.
TenantStats
Per-tenant stats (one entry per sub-broker).

Enums§

DeliveryStatus
Status of message delivery.