Initial commit.
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/target
|
||||
9
Cargo.toml
Normal file
9
Cargo.toml
Normal file
@@ -0,0 +1,9 @@
|
||||
[package]
|
||||
name = "docker-nisse"
|
||||
version = "0.1.0"
|
||||
authors = ["Anders Olsson <anders.e.olsson@gmail.com>"]
|
||||
edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
shiplift = "0.6"
|
||||
tokio = "0.1"
|
||||
18
src/main.rs
Normal file
18
src/main.rs
Normal file
@@ -0,0 +1,18 @@
|
||||
use shiplift::Docker;
|
||||
use tokio::prelude::{Future, Stream};
|
||||
|
||||
fn main() {
|
||||
let docker = Docker::new();
|
||||
|
||||
println!("listening for events");
|
||||
|
||||
let fut = docker
|
||||
.events(&Default::default())
|
||||
.for_each(|e| {
|
||||
println!("event -> {:?}", e);
|
||||
Ok(())
|
||||
})
|
||||
.map_err(|e| eprintln!("Error: {}", e));
|
||||
|
||||
tokio::run(fut);
|
||||
}
|
||||
Reference in New Issue
Block a user