summaryrefslogtreecommitdiffstats
path: root/examples/custom_host.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/custom_host.rs')
-rw-r--r--examples/custom_host.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/custom_host.rs b/examples/custom_host.rs
new file mode 100644
index 0000000..3b1fd3e
--- /dev/null
+++ b/examples/custom_host.rs
@@ -0,0 +1,13 @@
+use futures::Future;
+use shiplift::Docker;
+
+fn main() {
+ let docker = Docker::host("http://yourhost".parse().unwrap());
+
+ let fut = docker
+ .ping()
+ .map(|pong| println!("Ping: {}", pong))
+ .map_err(|e| eprintln!("Error: {}", e));
+
+ tokio::run(fut);
+}