Skip to main content

MachineRoom

Trait MachineRoom 

Source
pub trait MachineRoom {
    // Required methods
    fn has_room(
        &self,
        pool_id: &str,
        spec: &InstanceTypeSpec,
        machines: u32,
    ) -> bool;
    fn commit(&self, pool_id: &str, spec: &InstanceTypeSpec, machines: u32);
}
Expand description

What the cloud account can still launch, asked while pools choose their machines. The planner visits pools in order, so an implementation can hold back what earlier pools need before it answers for the next one.

Required Methods§

Source

fn has_room( &self, pool_id: &str, spec: &InstanceTypeSpec, machines: u32, ) -> bool

Whether machines of spec fit for the pool when it chooses automatically. An installed pool answers for the series it already runs and ignores quota.

Source

fn commit(&self, pool_id: &str, spec: &InstanceTypeSpec, machines: u32)

The machine a pool ends up with and the machines it launches with, whether it chose automatically or its machine was explicit. Called again with the same pool replaces the earlier answer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§