2 releases

0.0.2 Oct 16, 2022
0.0.1 Aug 25, 2022

#2 in #libray

Download history 6/week @ 2024-02-19 23/week @ 2024-02-26 2/week @ 2024-03-11 50/week @ 2024-04-01

52 downloads per month
Used in north-service

MIT/Apache

38KB
987 lines

north-consul

Build Status

Original Repo is here and all kudos to the owner https://github.com/pierresouchay/consul-rust

Documentation here.

Rust client libray for Consul HTTP API

Usage

    extern crate north_consul;

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

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

For more examples, see the tests .

Installation

Simply include the consul-rust in your Cargo dependencies.

[dependencies]
north_consul = "0.0.1"

Dependencies

~6–22MB
~319K SLoC