pub struct RuntimeOwnerPlan { /* private fields */ }Expand description
A runtime configuration that has passed deterministic validation.
Construct this value with RuntimeOwner::plan, then invoke
Self::build at the operational startup boundary.
Implementations§
Source§impl RuntimeOwnerPlan
impl RuntimeOwnerPlan
Sourcepub fn with_metadata_target_capacity(self, capacity: NonZeroUsize) -> Self
pub fn with_metadata_target_capacity(self, capacity: NonZeroUsize) -> Self
Sets the maximum retained metadata target histories for this runtime.
Idle and fenced targets consume capacity until explicitly and safely retired. The default is 4,096; this is not an in-flight operation limit. Each actor also retains at most this many resource histories, including tombstones retired by another actor. Replace an actor to release those tombstones; removing them while it is open could revive stale authority.
Sourcepub fn with_memory_limit(self, memory_limit: ProcessMemoryLimit) -> Self
pub fn with_memory_limit(self, memory_limit: ProcessMemoryLimit) -> Self
Supplies a container-provided memory limit for this runtime.
Sourcepub fn with_memory_policy(self, memory_policy: ManagedMemoryPolicy) -> Self
pub fn with_memory_policy(self, memory_policy: ManagedMemoryPolicy) -> Self
Derives the chargeable managed budget from the effective memory limit.
The default policy charges the whole effective limit, which is the behavior that existed before the policy existed. A ratio or headroom is adopted explicitly after measuring the service.
Sourcepub fn build(self) -> RuntimeResult<RuntimeOwner>
pub fn build(self) -> RuntimeResult<RuntimeOwner>
Builds the validated Tokio runtime owner.
§Errors
Returns an operational error when process-memory discovery or Tokio runtime construction fails, and a contract violation when the policy cannot resolve a positive budget from the effective limit.