pub struct Descriptor {
pub nodes: Vec<Node>,
pub communication: CommunicationConfig,
pub deploy: Option<Deploy>,
pub debug: Debug,
}Expand description
§Dataflow Specification
The main configuration structure for defining a Dora dataflow. Dataflows are specified through YAML files that describe the nodes, their connections, and execution parameters.
§Structure
A dataflow consists of:
- Nodes: The computational units that process data
- Communication: Optional communication configuration
- Deployment: Optional deployment configuration (unstable)
- Debug options: Optional development and debugging settings (unstable)
§Example
nodes:
- id: webcam
operator:
python: webcam.py
inputs:
tick: dora/timer/millis/100
outputs:
- image
- id: plot
operator:
python: plot.py
inputs:
image: webcam/imageFields§
§nodes: Vec<Node>List of nodes in the dataflow
This is the most important field of the dataflow specification.
Each node must be identified by a unique id:
§Example
nodes:
- id: foo
path: path/to/the/executable
# ... (see below)
- id: bar
path: path/to/another/executable
# ... (see below)For each node, you need to specify the path of the executable or script that Dora should run when starting the node.
Most of the other node fields are optional, but you typically want to specify at least some inputs and/or outputs.
communication: CommunicationConfigCommunication configuration (optional, uses defaults)
deploy: Option<Deploy>Deployment configuration (optional, unstable)
debug: DebugDebug options (optional, unstable)
Trait Implementations§
Source§impl Clone for Descriptor
impl Clone for Descriptor
Source§fn clone(&self) -> Descriptor
fn clone(&self) -> Descriptor
Returns a duplicate of the value. Read more
1.0.0 · 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 Descriptor
impl Debug for Descriptor
Source§impl DescriptorExt for Descriptor
impl DescriptorExt for Descriptor
fn resolve_aliases_and_set_defaults( &self, ) -> Result<BTreeMap<NodeId, ResolvedNode>>
fn visualize_as_mermaid(&self) -> Result<String>
fn blocking_read(path: &Path) -> Result<Descriptor>
fn parse(buf: Vec<u8>) -> Result<Descriptor>
fn check(&self, working_dir: &Path) -> Result<()>
fn check_in_daemon( &self, working_dir: &Path, coordinator_is_remote: bool, ) -> Result<()>
Source§impl<'de> Deserialize<'de> for Descriptor
impl<'de> Deserialize<'de> for Descriptor
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Descriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Descriptor, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Descriptor
impl JsonSchema for Descriptor
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl Serialize for Descriptor
impl Serialize for Descriptor
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnwindSafe for Descriptor
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 more