Rust client libray for Consul HTTP API
Switch branches/tags
Nothing to show
Clone or download
Pull request Compare This branch is 13 commits behind stusmall:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
data
src
tests
.gitignore
.travis.yml
Cargo.toml
LICENSE-APACHE
LICENSE-MIT
README.md

README.md

consul-rust

Build Status

Documentation here.

Rust client libray for Consul HTTP API

Usage

    extern crate consul;

    use std::collections::HashMap;
    use consul::Client;

    fn main(){
        let client = Client::new("http://127.0.0.1:8500");
        let services: HashMap<String, Vec<String>> = client.catalog.services().unwrap();
        println!("{:?}", services);
    }

For more example, see the tests .

Installation

Simply include the consul-rust in your Cargo dependencies.

[dependencies]
consul = "0.1"