Skip to content

jimmycuadra/rust-fleet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fleet

A Rust client library for fleet.

Documentation

https://jimmycuadra.github.io/rust-fleet/fleet/

Example

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!"),
};

Running the tests

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:

  1. Install Vagrant.
  2. vagrant up
  3. vagrant ssh
  4. cd share
  5. docker run -it --rm -v $(pwd):/source --net host jimmycuadra/rust
  6. cargo test

License

MIT