No release in over 3 years
Low commit activity in last 3 years
Consul Thin Client. Exposes Consul defined interfaces through a very thin abstraction layer.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
< 13, >= 10.0
~> 3.2
~> 0.9
< 4, >= 1.21

Runtime

< 3, >= 1.8
~> 1.11
< 4, >= 2.1
< 3, >= 1.6
 Project Readme

Consul::Client (DEPRECATED)

For the sake open source continuity please use and contribute to Diplomat

Thin Ruby Client around Consul REST API

Installation

Add this line to your application's Gemfile:

gem 'consul-ruby-client'

And then execute:

$ bundle

Or install it yourself as:

$ gem install consul-ruby-client

Usage

To use the client you have to require the root library

# Add the dependencies
require 'consul/client'

# Import that namespace
include Consul::Client

Key Value Store

kvs = KeyValue.new
kvs.put('cat','dog')
kvs.get('cat')

Agent

# Register a service named 'my_service'
Consul::Client::Agent.new.register(Agent::Service.for_name('my_service'))

Building

See the build README

Catalog

TODO

Sessions

TODO

Status

TODO

TODO

  • Tests, Currently all test were done throught building and installing the ruby client and verifying through REPL. That is not the long term solution. We are looking at integrating Consul into the rspec test itself. However a solid short term win will be completing rspec tests with set fixtures.

  • Implement more advance locking mechanisms

  • Complete the Agent API self, join, and force-leave

  • ACL API

  • Events

Contributing

  1. Fork it ( https://github.com/[my-github-username]/consul-client/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request