Module: Diplomat
- Defined in:
- lib/diplomat.rb,
lib/diplomat/kv.rb,
lib/diplomat/acl.rb,
lib/diplomat/lock.rb,
lib/diplomat/node.rb,
lib/diplomat/agent.rb,
lib/diplomat/check.rb,
lib/diplomat/error.rb,
lib/diplomat/event.rb,
lib/diplomat/nodes.rb,
lib/diplomat/query.rb,
lib/diplomat/health.rb,
lib/diplomat/status.rb,
lib/diplomat/members.rb,
lib/diplomat/service.rb,
lib/diplomat/session.rb,
lib/diplomat/version.rb,
lib/diplomat/datacenter.rb,
lib/diplomat/api_options.rb,
lib/diplomat/maintenance.rb,
lib/diplomat/rest_client.rb,
lib/diplomat/configuration.rb
Overview
Top level namespace ensures all required libraries are included and initializes the gem configration.
Defined Under Namespace
Modules: ApiOptions Classes: Acl, AclAlreadyExists, AclNotFound, Agent, Check, Configuration, Datacenter, Event, EventAlreadyExists, EventNotFound, Health, IdParameterRequired, InvalidTransaction, KeyAlreadyExists, KeyNotFound, Kv, Lock, Maintenance, Members, Node, Nodes, PathNotFound, Query, QueryAlreadyExists, QueryNotFound, RestClient, Service, Session, Status, UnknownStatus
Constant Summary collapse
- VERSION =
'2.0.2'.freeze
Class Attribute Summary collapse
-
.configuration ⇒ Object
Returns the value of attribute configuration.
-
.lib_path ⇒ Object
Returns the value of attribute lib_path.
-
.root_path ⇒ Object
Returns the value of attribute root_path.
Class Method Summary collapse
-
.configure {|Diplomat::Configuration| ... } ⇒ Object
Build optional configuration by yielding a block to configure.
-
.require_libs(*libs) ⇒ nil
(also: require_lib)
Internal: Requires internal Faraday libraries.
Class Attribute Details
.configuration ⇒ Object
Returns the value of attribute configuration.
10 11 12 |
# File 'lib/diplomat.rb', line 10 def configuration @configuration end |
.lib_path ⇒ Object
Returns the value of attribute lib_path.
9 10 11 |
# File 'lib/diplomat.rb', line 9 def lib_path @lib_path end |
.root_path ⇒ Object
Returns the value of attribute root_path.
8 9 10 |
# File 'lib/diplomat.rb', line 8 def root_path @root_path end |
Class Method Details
.configure {|Diplomat::Configuration| ... } ⇒ Object
Build optional configuration by yielding a block to configure
37 38 39 40 |
# File 'lib/diplomat.rb', line 37 def configure self.configuration ||= Diplomat::Configuration.new yield(configuration) end |
.require_libs(*libs) ⇒ nil Also known as: require_lib
Internal: Requires internal Faraday libraries.
15 16 17 18 19 |
# File 'lib/diplomat.rb', line 15 def require_libs(*libs) libs.each do |lib| require "#{lib_path}/#{lib}" end end |