pub struct TaskGraph {
pub id: GraphId,
pub goal: String,
pub tasks: Vec<TaskNode>,
pub status: GraphStatus,
pub default_failure_strategy: FailureStrategy,
pub default_max_retries: u32,
pub created_at: String,
pub finished_at: Option<String>,
}Expand description
A directed acyclic graph of tasks to be executed by the orchestrator.
Created by the Planner and driven to completion by the DagScheduler.
The tasks vec is the authoritative store; all indices (TaskId) reference
positions within it.
§Examples
use zeph_orchestration::{TaskGraph, TaskNode, GraphStatus, FailureStrategy};
let mut graph = TaskGraph::new("build and deploy service");
assert_eq!(graph.status, GraphStatus::Created);
assert_eq!(graph.default_failure_strategy, FailureStrategy::Abort);
assert_eq!(graph.default_max_retries, 3);Fields§
§id: GraphIdUnique graph identifier (UUID v4).
goal: StringHigh-level user goal that was decomposed into this graph.
tasks: Vec<TaskNode>All task nodes. Index i must satisfy tasks[i].id == TaskId(i).
status: GraphStatusCurrent lifecycle status of the graph as a whole.
default_failure_strategy: FailureStrategyGraph-wide failure strategy applied when a task has no per-task override.
default_max_retries: u32Graph-wide maximum retry count applied when a task has no per-task override.
created_at: StringISO-8601 UTC timestamp of graph creation.
finished_at: Option<String>ISO-8601 UTC timestamp set when the graph reaches a terminal status.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for TaskGraph
impl<'de> Deserialize<'de> for TaskGraph
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TaskGraph
impl RefUnwindSafe for TaskGraph
impl Send for TaskGraph
impl Sync for TaskGraph
impl Unpin for TaskGraph
impl UnsafeUnpin for TaskGraph
impl UnwindSafe for TaskGraph
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request