Class: Consul::Extensions::Base
- Inherits:
-
Object
- Object
- Consul::Extensions::Base
- Includes:
- Client
- Defined in:
- lib/consul/extensions/base.rb
Direct Known Subclasses
Constant Summary
Constants included from Client
Instance Method Summary collapse
-
#initialize(options) ⇒ Base
constructor
Public: Constructor for this extension.
Constructor Details
#initialize(options) ⇒ Base
Public: Constructor for this extension. Ensures a global unique ID for this client for a given namespace.
options - (Optional) Hash of Consul Client and extension options.
options[:data_center] - (Optional) The Consul data center. Default: 'dc1'.
options[:api_host] - (Optional) The Consul api host to request against. Default: '127.0.0.1'.
options[:api_port] - (Optional) The Consul api port the api host is listening to. Default: '8500'.
options[:version] - (Optional) The Consul API version to use. Default: 'v1'.
options[:logger] - (Optional) The default logging mechanism. Default: Logger.new(STDOUT).
Extension instance capable of generating GUID.
20 21 22 23 |
# File 'lib/consul/extensions/base.rb', line 20 def initialize() = {} if .nil? @options = .clone end |