-
Notifications
You must be signed in to change notification settings - Fork 11
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 generic component client http #334
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #334 +/- ##
==========================================
- Coverage 83.98% 82.64% -1.35%
==========================================
Files 28 31 +3
Lines 1374 1596 +222
Branches 1374 1596 +222
==========================================
+ Hits 1154 1319 +165
- Misses 161 216 +55
- Partials 59 61 +2 ☔ View full report in Codecov by Sentry. |
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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @uriel-starkware)
crates/mempool_infra/src/component_client.rs
line 62 at r1 (raw file):
where Request: Serialize, Response: for<'a> Deserialize<'a>,
Please add the bounds to the struct definition as well.
Code quote:
where
Request: Serialize,
Response: for<'a> Deserialize<'a>,
5e8ff05
to
5b2b9f6
Compare
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.
Reviewable status: 0 of 3 files reviewed, 2 unresolved discussions (waiting on @uriel-starkware)
crates/mempool_infra/tests/component_server_client_http_test.rs
line 197 at r1 (raw file):
let a_client = ComponentClientHttp::new(local_ip, a_port); let b_client = ComponentClientHttp::new(local_ip, b_port);
Is there a way to explicitly mention the types of these two? Currently they are implicilty inferred from the initation of the components.
Something in the sorts of
let a_client = ComponentClientHttp<RequestA,ResponseA>::new(local_ip, a_port);
Code quote:
let a_client = ComponentClientHttp::new(local_ip, a_port);
let b_client = ComponentClientHttp::new(local_ip, b_port);
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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion
crates/mempool_infra/src/component_client.rs
line 62 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Please add the bounds to the struct definition as well.
Done.
crates/mempool_infra/tests/component_server_client_http_test.rs
line 197 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
Is there a way to explicitly mention the types of these two? Currently they are implicilty inferred from the initation of the components.
Something in the sorts of
let a_client = ComponentClientHttp<RequestA,ResponseA>::new(local_ip, a_port);
there is always the option to write them as ComponentClientHttp<ComponentARequest, ComponentAResponse>
. Tell me if this is what you want. I will do it to server as well
5b2b9f6
to
45db391
Compare
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.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @Itay-Tsabary-Starkware)
crates/mempool_infra/tests/component_server_client_http_test.rs
line 197 at r1 (raw file):
Previously, uriel-starkware wrote…
there is always the option to write them as
ComponentClientHttp<ComponentARequest, ComponentAResponse>
. Tell me if this is what you want. I will do it to server as well
Ok, I did it as I described
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.
Reviewed 1 of 3 files at r1, 1 of 1 files at r2, 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @uriel-starkware)
This change is