grafos_stream/
placement.rs

1//! Placement constraints for pipeline stages.
2//!
3//! [`NodeConstraint`] describes where a stage should run. In the current
4//! implementation all stages run locally; constraints are recorded as
5//! placement hints for future remote dispatch via `CpuLease`.
6
7extern crate alloc;
8use alloc::string::String;
9
10/// Placement hint for a pipeline stage.
11///
12/// Specifies which fabric node a stage should execute on. Currently all
13/// stages run in-process; remote dispatch is planned as future work.
14#[derive(Debug, Clone, PartialEq, Eq)]
15pub enum NodeConstraint {
16    /// No placement preference — scheduler picks any available node.
17    Any,
18    /// Requires a node with GPU resources.
19    HasGpu,
20    /// Requires a node with at least this many bytes of memory.
21    HasMemory(u64),
22    /// Target a specific node by name or address.
23    Specific(String),
24}