jonhoo / faktory-rs

Rust bindings for Faktory clients and workers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No TLS support

jonhoo opened this issue · comments

Adding support for TLS should be fairly straightforward:

Given that users may also want to be able to specify options, we might need some intermediate builder that exposes TlsConnectorBuilder. I'm not entirely sure what the most ergonomic way to do this is, but one suggestions is to change StreamConnector to:

pub trait StreamConnector {
    type Addr: FromUrl;
    type Stream: Read + Write + Sized + 'static;
    fn connect(self, addr: Self::Addr) -> io::Result<Self::Stream>;
}

And the following impl block for the connection methods on Client to:

impl<C: StreamConnector> Client<C::Stream> {

This will require adding a little more code to the impl for TcpStream, but shouldn't be too bad.