pub struct Descriptor {
pub nodes: Vec<Node>,
pub env: Option<BTreeMap<String, EnvValue>>,
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.
env: Option<BTreeMap<String, EnvValue>>Global Environment variables inherited by all nodes (optional)
§Example
env:
MY_VAR: "my_var"
nodes:
- id: foo
path: path/to/the/executable
# ... (see below)
- id: bar
path: path/to/another/executable
# ... (see below)Note that, If there is an env at the node level, Node level env will have more priority than the global env
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
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
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>,
Source§impl JsonSchema for Descriptor
impl JsonSchema for Descriptor
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$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,
Auto Trait Implementations§
impl Freeze for Descriptor
impl RefUnwindSafe for Descriptor
impl Send for Descriptor
impl Sync for Descriptor
impl Unpin for Descriptor
impl UnsafeUnpin 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
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>
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