pub trait CapabilitySource {
// Required methods
fn capability_labels(&self) -> Vec<(String, String)>;
fn capability_resources(&self) -> Vec<Resource>;
}Expand description
A provider of scheduling capability truth: emits its stable capabilities +
declared capacity in the shared vocabulary so a PlacementCandidate / node
record can aggregate them (one source of truth — no hand-declaration, no
drift between e.g. a node record claiming runtime=kata and the live
selection.rs knowing cloud-hypervisor is missing).
Implementors: backend-selection registries, device pools, future NUMA/
topology providers. Aggregators (the node-record publisher) call
CapabilitySource::capability_labels / CapabilitySource::capability_resources
and fold the results into the published record.
Required Methods§
Sourcefn capability_labels(&self) -> Vec<(String, String)>
fn capability_labels(&self) -> Vec<(String, String)>
Stable capability labels — e.g. ("runtime", "kata"), ("gpu.arch", "hopper"),
("topology.zone", "us-east-1a").
Sourcefn capability_resources(&self) -> Vec<Resource>
fn capability_resources(&self) -> Vec<Resource>
Declared countable capacity — e.g. Resource("nvidia.com/gpu", "8"),
Resource("memory", "512Gi"). (Live/allocatable is volatile; the node
record combines declared capacity with a liveness report.)