feat: refactor MakeTransport and Incoming#421
Open
Millione wants to merge 9 commits intocloudwego:mainfrom
Open
feat: refactor MakeTransport and Incoming#421Millione wants to merge 9 commits intocloudwego:mainfrom
MakeTransport and Incoming#421Millione wants to merge 9 commits intocloudwego:mainfrom
Conversation
yukiiiteru
reviewed
Oct 29, 2024
| pub trait ShmExt: Send + Sync { | ||
| fn release_read_and_reuse(&self) {} | ||
|
|
||
| async fn close(&mut self) -> Result<(), anyhow::Error> { |
Member
There was a problem hiding this comment.
Why use async-trait and anyhow, RPITIT and Box<dyn std::error::Error> will also work.
Member
Author
There was a problem hiding this comment.
async-trait is for the Box<dyn ShmExt> usage, anyhow I think it is good enough?
|
|
||
| pub trait Incoming: fmt::Debug + Send + 'static { | ||
| fn accept(&mut self) -> impl Future<Output = io::Result<Option<Conn>>> + Send; | ||
| type Conn: ConnExt; |
Member
There was a problem hiding this comment.
This naming is very confusing.
Member
Author
There was a problem hiding this comment.
It represents a connection instance, any good advice about the naming?
| pub trait TransportEndpoint { | ||
| fn get_transport(&self) -> Option<Transport>; | ||
| fn has_transport(&self) -> bool; | ||
| fn set_transport(&mut self, transport: Transport); |
Member
There was a problem hiding this comment.
This trait is also confusing.
Member
Author
There was a problem hiding this comment.
This is for log and metrics usage to differ between uds and shmipc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
in favour of shmipc