Skip to content

xaviershay/consul-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Ruby client gem for Consul HTTP API.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages