Crate knusbaum_consul

Source
Expand description

Rust client libray for Consul HTTP API

§Usage

This crate is on crates.io and can be used by adding consul to the dependencies in your project’s Cargo.toml.

[dependencies]
consul = "*"

and this to your crate root:

extern crate consul;

§Examples

use std::collections::HashMap;
use consul::{Client, Service};

let client = Client::new("http://127.0.0.1:8500");
let services: HashMap<String, Service> = client.agent.services().unwrap();
println!("{:?}", services);

Structs§

Agent
public api Agent can be used to query the Agent endpoints
AgentMember
public api AgentMember represents a cluster member known to the agent
Catalog
Catalog can be used to query the Catalog endpoints
Client
provides a client to the Consul API
Health
Health can be used to query the Health endpoints
HealthService
HealthService is used for the health service
Keystore
Node
Node represents a node
RegisterService
Service represents a service
Service
Service represents a service
ServiceNode
Session
TtlHealthCheck

Functions§

find_path
get_string

Type Aliases§

ConsulResult