Skip to content

Conversation

Millione
Copy link
Member

in favour of shmipc

pub trait ShmExt: Send + Sync {
fn release_read_and_reuse(&self) {}

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

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
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?


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

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
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?

pub trait TransportEndpoint {
fn get_transport(&self) -> Option<Transport>;
fn has_transport(&self) -> bool;
fn set_transport(&mut self, transport: Transport);
Copy link
Member

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
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

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