-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: make sourcetransfomer API simpler #34
Conversation
Signed-off-by: Vigith Maurice <vigith@gmail.com>
Signed-off-by: Vigith Maurice <vigith@gmail.com>
Signed-off-by: Vigith Maurice <vigith@gmail.com>
Signed-off-by: Vigith Maurice <vigith@gmail.com>
@@ -10,5 +10,5 @@ path = "src/main.rs" | |||
[dependencies] | |||
tonic = "0.9" | |||
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } | |||
numaflow = { git = "https://github.com/numaproj/numaflow-rs.git", branch = "main" } | |||
numaflow = { path = "../../" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to do this for all examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can copy the Dockerfile
changes (rust compiler image, source for final image) and .dockerignore
files from map-cat
example to the source-transformer-now
example also.
src/sourcetransform.rs
Outdated
#[async_trait] | ||
pub trait SourceTransformer { | ||
/// transform takes in an input element and can produce 0, 1, or more results. The input is a [`Datum`] | ||
/// transform takes in an input element and can produce 0, 1, or more results. The input is a [`SourceTransformRequest`] | ||
/// and the output is a ['Vec`] of [`Message`]. In a `transform` each element is processed independently |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mismatched backtick here: ['Vec`]
src/sourcetransform.rs
Outdated
Ok(Response::new(proto::SourceTransformResponse { | ||
results: messages | ||
.into_iter() | ||
.map(move |msg| msg.into()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move
keyword is not needed here
src/sourcetransform.rs
Outdated
sock_addr: PathBuf, | ||
max_message_size: usize, | ||
server_info_file: PathBuf, | ||
sourcetrf_svc: Option<T>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think field name can be generic like svc
since we don't specify trait bounds for T
on the struct.
@@ -10,5 +10,5 @@ path = "src/main.rs" | |||
[dependencies] | |||
tonic = "0.9" | |||
tokio = { version = "1.0", features = ["macros", "rt-multi-thread"] } | |||
numaflow = { git = "https://github.com/numaproj/numaflow-rs.git", branch = "main" } | |||
numaflow = { path = "../../" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can copy the Dockerfile
changes (rust compiler image, source for final image) and .dockerignore
files from map-cat
example to the source-transformer-now
example also.
Signed-off-by: Vigith Maurice <vigith@gmail.com>
Signed-off-by: Vigith Maurice <vigith@gmail.com>
No description provided.