Module: Consulkit

Extended by:
Configurable
Defined in:
lib/consulkit.rb,
lib/consulkit/error.rb,
lib/consulkit/client.rb,
lib/consulkit/version.rb,
lib/consulkit/defaults.rb,
lib/consulkit/client/kv.rb,
lib/consulkit/configurable.rb,
lib/consulkit/client/health.rb,
lib/consulkit/client/session.rb,
lib/consulkit/semaphore_coordinator.rb,
lib/consulkit/middleware/raise_error.rb

Overview

Ruby toolkit for the Consul API.

Defined Under Namespace

Modules: Configurable, Defaults, Middleware Classes: Client, Error, SemaphoreCoordinator

Constant Summary collapse

VERSION =
'0.2.0'

Constants included from Configurable

Configurable::CONFIGURABLE_KEYS

Instance Attribute Summary

Attributes included from Configurable

#connection_options, #http_addr, #http_token, #middleware

Class Method Summary collapse

Methods included from Configurable

options, setup!

Class Method Details

.clientObject



18
19
20
# File 'lib/consulkit.rb', line 18

def client
  Consulkit::Client.new(options)
end

.semaphore_coordinator(key_prefix, client: nil, logger: nil) ⇒ Object



22
23
24
# File 'lib/consulkit.rb', line 22

def semaphore_coordinator(key_prefix, client: nil, logger: nil)
  Consulkit::SemaphoreCoordinator.new(client || self.client, key_prefix, logger)
end