pub struct TenantInfo {
pub tenant_id: TenantId,
pub quota: TenantQuota,
pub current_kernels: AtomicU64,
pub messages_this_window: AtomicU64,
pub window_start_secs: AtomicU64,
pub engagement_cost_ns: RwLock<HashMap<u64, u64>>,
pub registered_at: Instant,
}Expand description
Per-tenant bookkeeping stored inside TenantRegistry.
Fields§
§tenant_id: TenantIdTenant identity.
quota: TenantQuotaQuota (immutable after registration; re-register to update).
current_kernels: AtomicU64Number of kernels currently registered for this tenant.
messages_this_window: AtomicU64Number of messages sent in the current rate-limit window.
window_start_secs: AtomicU64Start of the current rate-limit window (seconds-granularity).
engagement_cost_ns: RwLock<HashMap<u64, u64>>Per-engagement billable nanoseconds (keyed by engagement_id).
registered_at: InstantWhen the tenant was registered.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for TenantInfo
impl !RefUnwindSafe for TenantInfo
impl Send for TenantInfo
impl Sync for TenantInfo
impl Unpin for TenantInfo
impl UnsafeUnpin for TenantInfo
impl UnwindSafe for TenantInfo
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Mutably borrows from an owned value. Read more
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.