11 releases

0.4.2 May 11, 2021
0.3.0 Aug 5, 2019
0.2.0 May 27, 2017
0.0.6 Jul 13, 2016
0.0.4 Jul 1, 2015

#222 in HTTP client

Download history 234/week @ 2024-01-09 473/week @ 2024-01-16 384/week @ 2024-01-23 385/week @ 2024-01-30 415/week @ 2024-02-06 534/week @ 2024-02-13 595/week @ 2024-02-20 718/week @ 2024-02-27 1117/week @ 2024-03-05 1150/week @ 2024-03-12 556/week @ 2024-03-19 231/week @ 2024-03-26 459/week @ 2024-04-02 996/week @ 2024-04-09 344/week @ 2024-04-16 644/week @ 2024-04-23

2,464 downloads per month
Used in sentinel-core

MIT/Apache

34KB
889 lines

consul-rust

Build Status

Documentation here.

Rust client libray for Consul HTTP API

Usage

    extern crate consul;

    use std::collections::HashMap;
    use consul::{Client, Config, QueryMeta};
    use consul::catalog::Catalog;

    fn main(){
        let config = Config::new().unwrap();
        let client = Client::new(config);
		let services: (HashMap<String, String>, QueryMeta) = client.services(None).unwrap();
		println!("{:?}", services);
    }

For more examples, see the tests .

Installation

Simply include the consul-rust in your Cargo dependencies.

[dependencies]
consul = "0.4"

Dependencies

~6–22MB
~315K SLoC