Skip to content

feat: refactor MakeTransport and Incoming#421

Closed
Millione wants to merge 9 commits intocloudwego:mainfrom
Millione:shmipc
Closed

feat: refactor MakeTransport and Incoming#421
Millione wants to merge 9 commits intocloudwego:mainfrom
Millione:shmipc

Conversation

@Millione
Copy link
Copy Markdown
Member

in favour of shmipc

Comment thread volo/src/net/shm.rs
pub trait ShmExt: Send + Sync {
fn release_read_and_reuse(&self) {}

async fn close(&mut self) -> Result<(), anyhow::Error> {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use async-trait and anyhow, RPITIT and Box<dyn std::error::Error> will also work.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

async-trait is for the Box<dyn ShmExt> usage, anyhow I think it is good enough?

Comment thread volo/src/net/incoming.rs

pub trait Incoming: fmt::Debug + Send + 'static {
fn accept(&mut self) -> impl Future<Output = io::Result<Option<Conn>>> + Send;
type Conn: ConnExt;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This naming is very confusing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It represents a connection instance, any good advice about the naming?

Comment thread volo/src/net/shm.rs
pub trait TransportEndpoint {
fn get_transport(&self) -> Option<Transport>;
fn has_transport(&self) -> bool;
fn set_transport(&mut self, transport: Transport);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This trait is also confusing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for log and metrics usage to differ between uds and shmipc

Comment thread volo/src/context.rs
@Millione Millione closed this Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants