Skip to content

Commit

Permalink
Introduce CommonOperations vs RegistrationBuilder
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <[email protected]>
  • Loading branch information
mxgrey committed Jan 8, 2025
1 parent 464aedf commit 06a7a82
Show file tree
Hide file tree
Showing 9 changed files with 318 additions and 317 deletions.
5 changes: 2 additions & 3 deletions src/diagram/fork_result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ mod tests {

fixture
.registry
.registration_builder()
.with_fork_result()
.register_node_builder(
"check_even".to_string(),
"check_even".to_string(),
|builder: &mut Builder, _config: ()| builder.create_map_block(&check_even),
);
)
.with_fork_result();

fn echo(s: String) -> String {
s
Expand Down
10 changes: 5 additions & 5 deletions src/diagram/join.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use tracing::debug;
use crate::{Builder, IterBufferable, Output};

use super::{
DiagramError, DynOutput, NextOperation, NodeRegistry, SerializeMessage, SourceOperation,
DiagramError, DynOutput, NextOperation, DataRegistry, SerializeMessage, SourceOperation,
};

#[derive(Debug, Serialize, Deserialize, JsonSchema)]
Expand All @@ -25,7 +25,7 @@ pub struct JoinOp {
pub(super) no_serialize: Option<bool>,
}

pub(super) fn register_join_impl<T, Serializer>(registry: &mut NodeRegistry)
pub(super) fn register_join_impl<T, Serializer>(registry: &mut DataRegistry)
where
T: Send + Sync + 'static,
Serializer: SerializeMessage<Vec<T>>,
Expand All @@ -43,7 +43,7 @@ where
/// [`serde_json::Value`].
pub(super) fn serialize_and_join(
builder: &mut Builder,
registry: &NodeRegistry,
registry: &DataRegistry,
outputs: Vec<DynOutput>,
) -> Result<Output<serde_json::Value>, DiagramError> {
debug!("serialize and join outputs {:?}", outputs);
Expand Down Expand Up @@ -138,8 +138,8 @@ mod tests {

fixture
.registry
.registration_builder()
.with_opaque_request()
.opt_out()
.no_request_deserializing()
.register_node_builder(
"serialize_join_output".to_string(),
"serialize_join_output".to_string(),
Expand Down
Loading

0 comments on commit 06a7a82

Please sign in to comment.