module Giraffi::Config
Defines constants and methods related to configuration
Constants
- DEFAULT_APIKEY
The APIKEY to allow you to use the
Giraffi
API if none is set- DEFAULT_APPLOGS_ENDPOINT
The endpoint for posting the application logs if none is set
- DEFAULT_ENDPOINT
The basic endpoint if none is set
- DEFAULT_MONITORINGDATA_ENDPOINT
The endpoint for posting the monitoringdata if none is set
- DEFAULT_REQUEST_HEADERS
The HTTP request header if none is set
- VALID_OPTIONS_KEYS
An array of valid keys in the options hash when configuring a {Giraffi::Client}
Public Class Methods
extended(base)
click to toggle source
Set all configuration options to thier values when this module is extended
# File lib/giraffi/config.rb, line 39 def self.extended(base) base.reset end
Public Instance Methods
options()
click to toggle source
Create a hash of options and thier values
# File lib/giraffi/config.rb, line 44 def options options = {} VALID_OPTIONS_KEYS.each{|k| options[k] = send(k)} options end
reset()
click to toggle source
Reset all configuration options to defaults
# File lib/giraffi/config.rb, line 51 def reset self.request_headers = DEFAULT_REQUEST_HEADERS self.endpoint = DEFAULT_ENDPOINT self.monitoringdata_endpoint = DEFAULT_MONITORINGDATA_ENDPOINT self.applogs_endpoint = DEFAULT_APPLOGS_ENDPOINT self.apikey = DEFAULT_APIKEY end