0.02
No commit activity in last 3 years
No release in over 3 years
Ruby client library for Consul HTTP API.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

Consul Client

Ruby client library for Consul HTTP API, providing both a thin wrapper around the raw API and higher level behaviours for operating in a Consul environment.

This library is experimental and unmaintained! You probably shouldn't use it! Have you tried Diplomat?

Usage

It's a gem:

gem install consul-client

Simple API usage:

require 'consul/client'

client = Consul::Client.v1.http
client.get("/agent/self")

See example directory for more:

  • puts_service.rb is a minimum server that demostrates coordinated shutdown.
  • http_service.rb builds on top of webrick for an auto-updating server with coordinated restart.

A Vagrantfile is provided that makes three Consul nodes, which is handy for playing around.

Documentation

Comprehensive YARD documentation is available, though honestly you're probably better off just working from the example directory.