Skip to main content

Module policy

Module policy 

Source
Expand description

Pluggable admission-control hook for spawns and message sends.

This replaces the upstream tenant::quota::QuotaEnforcer coupling: instead of the scheduler depending on a concrete multi-tenant quota type, it depends on this trait. Hosts that need per-tenant quotas, per-actor memory budgets, or rate limiting implement ResourcePolicy and install it via ActorScheduler::with_resource_policy.

The default policy is NoopPolicy, which admits everything.

Structs§

NoopPolicy
The default policy: admit all spawns and sends.

Traits§

ResourcePolicy
Admission control for actor spawns and message sends.