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

#651 in HTTP client

Download history 637/week @ 2025-10-13 378/week @ 2025-10-20 332/week @ 2025-10-27 231/week @ 2025-11-03 191/week @ 2025-11-10 195/week @ 2025-11-17 207/week @ 2025-11-24 188/week @ 2025-12-01 168/week @ 2025-12-08 619/week @ 2025-12-15 709/week @ 2025-12-22 401/week @ 2025-12-29 518/week @ 2026-01-05 376/week @ 2026-01-12 507/week @ 2026-01-19 616/week @ 2026-01-26

2,065 downloads per month
Used in 4 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

~9–24MB
~307K SLoC