Skip to main content

SchedulingAlgorithm

Trait SchedulingAlgorithm 

Source
pub trait SchedulingAlgorithm: Send + Sync {
    // Required methods
    fn score(&self, workload: &Workload, node: &NodeResources) -> f64;
    fn name(&self) -> &str;
}
Expand description

Trait for scheduling algorithms

Required Methods§

Source

fn score(&self, workload: &Workload, node: &NodeResources) -> f64

Score a node for a workload (higher = better)

Source

fn name(&self) -> &str

Algorithm name

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§