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

#549 in HTTP client

Download history 184/week @ 2025-08-29 124/week @ 2025-09-05 166/week @ 2025-09-12 220/week @ 2025-09-19 462/week @ 2025-09-26 523/week @ 2025-10-03 569/week @ 2025-10-10 462/week @ 2025-10-17 413/week @ 2025-10-24 195/week @ 2025-10-31 224/week @ 2025-11-07 231/week @ 2025-11-14 194/week @ 2025-11-21 185/week @ 2025-11-28 165/week @ 2025-12-05 207/week @ 2025-12-12

820 downloads per month
Used in 3 crates

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

~7–23MB
~283K SLoC