Crates.io | north-derives |
lib.rs | north-derives |
version | 0.1.2 |
source | src |
created_at | 2023-07-25 21:29:34.02752 |
updated_at | 2023-07-25 21:43:37.870656 |
description | North config is a multi source configuration crate designed as part of the North Microservice Framework |
homepage | https://github.com/juicycleff/north-framework |
repository | https://github.com/juicycleff/north-framework |
max_upload_size | |
id | 926026 |
size | 5,057 |
Original Repo is here and all kudos to the owner https://github.com/pierresouchay/consul-rust
Rust client libray for Consul HTTP API
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 .
Simply include the consul-rust in your Cargo dependencies.
[dependencies]
north_consul = "0.0.1"