A Rust client library for fleet.
https://jimmycuadra.github.io/rust-fleet/fleet/
extern crate fleet;
use fleet::Client;
let client = Client::new("http://localhost:2999");
match client.list_units() {
Ok(unit_page) => {
for unit in unit_page.units {
println!("{}", unit.name);
}
},
None => println!("No units in fleet!"),
};
The test suite includes integration tests that assume the fleet API to be running on localhost:2999. A Vagrant environment for this is provided. Simply follow these steps:
- Install Vagrant.
vagrant up
vagrant ssh
cd share
docker run -it --rm -v $(pwd):/source --net host jimmycuadra/rust
cargo test