Module: Fleet::Configuration
- Included in:
- Fleet
- Defined in:
- lib/fleet/configuration.rb
Constant Summary collapse
- VALID_OPTIONS_KEYS =
[ :fleet_api_url, :fleet_api_version, :open_timeout, :read_timeout, :logger ]
- DEFAULT_FLEET_API_URL =
ENV['FLEETCTL_ENDPOINT'] || 'unix:///var/run/fleet.sock'
- DEFAULT_FLEET_API_VERSION =
'v1'- DEFAULT_OPEN_TIMEOUT =
2- DEFAULT_READ_TIMEOUT =
5- DEFAULT_LOGGER =
::Logger.new(STDOUT)
Class Method Summary collapse
Instance Method Summary collapse
-
#options ⇒ Object
Return a has of all the current config options.
- #reset ⇒ Object
Class Method Details
.extended(base) ⇒ Object
22 23 24 |
# File 'lib/fleet/configuration.rb', line 22 def self.extended(base) base.reset end |
Instance Method Details
#options ⇒ Object
Return a has of all the current config options
27 28 29 |
# File 'lib/fleet/configuration.rb', line 27 def VALID_OPTIONS_KEYS.each_with_object({}) { |k, o| o[k] = send(k) } end |
#reset ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/fleet/configuration.rb', line 31 def reset self.fleet_api_url = DEFAULT_FLEET_API_URL self.fleet_api_version = DEFAULT_FLEET_API_VERSION self.open_timeout = DEFAULT_OPEN_TIMEOUT self.read_timeout = DEFAULT_READ_TIMEOUT self.logger = DEFAULT_LOGGER end |