-
Notifications
You must be signed in to change notification settings - Fork 25
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
chore(sequencer_infra): add component client trait for remote client #2085
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2085 +/- ##
===========================================
+ Coverage 40.10% 55.82% +15.71%
===========================================
Files 26 8 -18
Lines 1895 292 -1603
Branches 1895 292 -1603
===========================================
- Hits 760 163 -597
+ Misses 1100 115 -985
+ Partials 35 14 -21 ☔ View full report in Codecov by Sentry. |
46aafa6
to
4f8d2b3
Compare
ffca5ca
to
9bb7bdd
Compare
fba6bac
to
8d059be
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.
Reviewed 1 of 2 files at r1, all commit messages.
Reviewable status: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @Itay-Tsabary-Starkware)
crates/starknet_sequencer_infra/src/component_client/remote_component_client.rs
line 72 at r1 (raw file):
/// client.send(request); /// } /// ```
Please update the doc.
Code quote:
/// # Example
/// ```rust
/// // Example usage of the RemoteComponentClient
///
/// use serde::{Deserialize, Serialize};
///
/// use crate::starknet_sequencer_infra::component_client::RemoteComponentClient;
/// use crate::starknet_sequencer_infra::component_definitions::RemoteClientConfig;
///
/// // Define your request and response types
/// #[derive(Serialize, Deserialize, Debug, Clone)]
/// struct MyRequest {
/// pub content: String,
/// }
///
/// #[derive(Serialize, Deserialize, Debug)]
/// struct MyResponse {
/// content: String,
/// }
///
/// #[tokio::main]
/// async fn main() {
/// // Create a channel for sending requests and receiving responses
/// // Instantiate the client.
/// let ip_address = std::net::IpAddr::V6(std::net::Ipv6Addr::new(0, 0, 0, 0, 0, 0, 0, 1));
/// let port: u16 = 8080;
/// let socket = std::net::SocketAddr::new(ip_address, port);
/// let config = RemoteClientConfig {
/// socket,
/// retries: 3,
/// idle_connections: usize::MAX,
/// idle_timeout: 90,
/// };
/// let client = RemoteComponentClient::<MyRequest, MyResponse>::new(config);
///
/// // Instantiate a request.
/// let request = MyRequest { content: "Hello, world!".to_string() };
///
/// // Send the request; typically, the client should await for a response.
/// client.send(request);
/// }
/// ```
crates/starknet_sequencer_infra/src/component_client/remote_component_client.rs
line 143 at r1 (raw file):
where Request: Send + Sync + Serialize + DeserializeOwned + Clone + Debug, Response: Send + Sync + Serialize + DeserializeOwned + Clone + Debug,
Please remove this, its not needed for the response.
Code quote:
+ Clone
8d059be
to
45032b9
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: 1 of 2 files reviewed, 2 unresolved discussions (waiting on @nadin-Starkware)
crates/starknet_sequencer_infra/src/component_client/remote_component_client.rs
line 72 at r1 (raw file):
Previously, nadin-Starkware (Nadin Jbara) wrote…
Please update the doc.
What's there to update?
crates/starknet_sequencer_infra/src/component_client/remote_component_client.rs
line 143 at r1 (raw file):
Previously, nadin-Starkware (Nadin Jbara) wrote…
Please remove this, its not needed for the response.
Done.
commit-id:5b800b4d
45032b9
to
05aa17c
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.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)
crates/starknet_sequencer_infra/src/component_client/remote_component_client.rs
line 72 at r1 (raw file):
Previously, Itay-Tsabary-Starkware wrote…
What's there to update?
Adding the ComponentClient, which you already did :)
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 2 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @Itay-Tsabary-Starkware)
✓ Commit merged in pull request #2119 |
Stack: