consul 0.0.6

Rust client libray for Consul HTTP API

Crate consul [] [src]

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("127.0.0.1:8500");
let services: HashMap<String, Service> = client.agent.services();
println!("{:?}", services);

Structs

Agent

Agent can be used to query the Agent endpoints

AgentMember

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

Session
TtlHealthCheck

Functions

get_string