https://github.com/pierresouchay/consul-rust
Rust client libray for Consul HTTP API
https://github.com/pierresouchay/consul-rust
Last synced: about 2 months ago
JSON representation
Rust client libray for Consul HTTP API
- Host: GitHub
- URL: https://github.com/pierresouchay/consul-rust
- Owner: pierresouchay
- License: apache-2.0
- Created: 2014-09-28T08:50:32.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2023-01-08T16:53:34.000Z (over 2 years ago)
- Last Synced: 2025-03-29T17:11:38.714Z (2 months ago)
- Language: Rust
- Size: 114 KB
- Stars: 93
- Watchers: 4
- Forks: 49
- Open Issues: 21
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
## consul-rust
[](https://github.com/pierresouchay/consul-rust/actions?query=branch%3Amaster)
[](https://crates.io/crates/consul)[Documentation here](https://docs.rs/consul/).
Rust client libray for [Consul](http://consul.io/) 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, QueryMeta) = client.services(None).unwrap();
println!("{:?}", services);
}
```For more examples, see the **[tests](https://github.com/stusmall/consul-rust/blob/master/tests)** .
### Installation
Simply include the consul-rust in your Cargo dependencies.
```
[dependencies]
consul = "0.4"
```