pub enum DeploymentShape {
Embedded,
CoordinatorOnly,
Worker(String),
RemoteClient(String),
}Expand description
Named deployment assembly — process topology shape.
Selected via ChrononBuilder fluent methods; drives which loops
crate::Chronon::run starts. Maps to the public crate getting-started topologies:
| Shape | Builder | Local loops | When to use |
|---|---|---|---|
Self::Embedded | .embedded() | Tick and worker | Embedded — one process |
Self::CoordinatorOnly | .coordinator_only() | Tick only | Coordinator–worker coordinator binary |
Self::Worker | .worker(pool) | Claim + execute | Coordinator–worker worker binary(ies) |
Self::RemoteClient | .remote_coordinator(url) | None | Remote HTTP client — schedule via HTTP |
Coordinator–worker and remote HTTP client need a shared durable store (Postgres, usually +
Redis) on the host that runs Chronon loops. See crate::RemoteCoordinatorClient for the
HTTP client path.
§Examples
use chronon_runtime::DeploymentShape;
assert_eq!(DeploymentShape::default(), DeploymentShape::Embedded);
let worker = DeploymentShape::Worker("general".into());
assert!(matches!(worker, DeploymentShape::Worker(_)));Variants§
Embedded
Coordinator tick loop + worker in one process (embedded default).
CoordinatorOnly
Scheduler tick and partition assigner only; no script execution (coordinator binary).
Worker(String)
Worker loop for pool_id; claims runs from the shared store (worker binary).
RemoteClient(String)
No local loops; host uses crate::RemoteCoordinatorClient against base_url.
Trait Implementations§
Source§impl Clone for DeploymentShape
impl Clone for DeploymentShape
Source§fn clone(&self) -> DeploymentShape
fn clone(&self) -> DeploymentShape
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeploymentShape
impl Debug for DeploymentShape
Source§impl Default for DeploymentShape
impl Default for DeploymentShape
Source§fn default() -> DeploymentShape
fn default() -> DeploymentShape
Returns the “default value” for a type. Read more
impl Eq for DeploymentShape
Source§impl PartialEq for DeploymentShape
impl PartialEq for DeploymentShape
impl StructuralPartialEq for DeploymentShape
Auto Trait Implementations§
impl Freeze for DeploymentShape
impl RefUnwindSafe for DeploymentShape
impl Send for DeploymentShape
impl Sync for DeploymentShape
impl Unpin for DeploymentShape
impl UnsafeUnpin for DeploymentShape
impl UnwindSafe for DeploymentShape
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more