SSH support
I have some shell scripts that control docker on a remote system using an ssh connection to that machine. I'd like to upgrade those shell scripts to Rust.
I understand that making ssh2 a required dependency of this project can be cumbersome since most people aren't using this feature. Could permitting the library to communicate over a generic reader/writer work? That's something I'd be willing to work with.
Are you planning to add the following parameters?
impl Docker {
// `R` and `W` may be wrapped into ssh tunnel
fn new_from_reader_writer<R:Reader, W:Writer>(r:R, w:W, protocol: Protocol) ->Docker { .. }
}
Yes. This exactly what I have in mind. That'll let you use this over any reliable stream.
If implemented as above, the reader/writer would need to be wrapped in HyperClient. Then, the following form may be more preferable.
// pseudo code
let http: HyperClient = HyperClient::with_rw(rd, wr)?;
let docker = Docker::new(http, Unix)?