north-consul

Crates.ionorth-consul
lib.rsnorth-consul
version0.0.2
sourcesrc
created_at2022-08-25 21:16:10.932405
updated_at2022-10-16 01:45:25.826736
descriptionRust client libray for Consul HTTP API
homepagehttps://github.com/juicycleff/north-framework
repositoryhttps://github.com/juicycleff/north-framework
max_upload_size
id652426
size46,707
Rex Raphael (juicycleff)

documentation

https://docs.rs/north-consul/

README

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"
Commit count: 70

cargo fmt