summaryrefslogtreecommitdiffstats
path: root/src/transport.rs
diff options
context:
space:
mode:
authorsoftprops <d.tangren@gmail.com>2016-01-03 10:39:26 -0500
committersoftprops <d.tangren@gmail.com>2016-01-03 10:39:26 -0500
commit4670063ee9b530f10caaca6aafcbbfdf21f6c43e (patch)
treef4fc4307790eaf66070b84f50f6403366428593c /src/transport.rs
parent151d82f51855644aa91fbdec07f692a3af61471f (diff)
document transport
Diffstat (limited to 'src/transport.rs')
-rw-r--r--src/transport.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/transport.rs b/src/transport.rs
index 1eda618..da5c904 100644
--- a/src/transport.rs
+++ b/src/transport.rs
@@ -28,11 +28,15 @@ fn lift_status_err(status: u16) -> Result<Box<Read>> {
}
}
+/// Transports are types which define the means of communication
+/// with the docker daemon
pub enum Transport {
+ /// A network tcp interface
Tcp {
client: Client,
host: String,
},
+ /// A Unix domain socket
Unix {
client: Client,
path: String,
@@ -67,7 +71,6 @@ impl Transport {
endpoint: &str,
body: Option<Body>)
-> Result<Box<Read>> {
- println!("requesting {:?} {:?}", self, endpoint);
let req = match *self {
Transport::Tcp { ref client, ref host } => {
client.request(method, &format!("{}{}", host, endpoint)[..])