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

#400 in HTTP client

Download history 192/week @ 2024-07-21 157/week @ 2024-07-28 252/week @ 2024-08-04 161/week @ 2024-08-11 186/week @ 2024-08-18 150/week @ 2024-08-25 25/week @ 2024-09-01 61/week @ 2024-09-08 39/week @ 2024-09-15 47/week @ 2024-09-22 82/week @ 2024-09-29 87/week @ 2024-10-06 51/week @ 2024-10-13 73/week @ 2024-10-20 39/week @ 2024-10-27 82/week @ 2024-11-03

248 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

~7–19MB
~277K SLoC