Class: Barkdog::Client
- Inherits:
-
Object
- Object
- Barkdog::Client
- Includes:
- Logger::Helper
- Defined in:
- lib/barkdog/client.rb
Instance Method Summary collapse
- #apply(file) ⇒ Object
- #export(export_options = {}) ⇒ Object
-
#initialize(options = {}) ⇒ Client
constructor
A new instance of Client.
Methods included from Logger::Helper
Constructor Details
#initialize(options = {}) ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/barkdog/client.rb', line 4 def initialize( = {}) @options = api_key, app_key = @options.values_at(:api_key, :application_key) raise 'API Key does not exist' unless api_key raise 'Application Key does not exist' unless app_key # api_key, application_key=nil, host=nil, device=nil, silent=true, timeout=nil # We force silent to false so any exceptions get propated back out and we fail loudly. @dog = Dogapi::Client.new(api_key, app_key, nil, nil, false, @options[:datadog_timeout]) @driver = Barkdog::Driver.new(@dog, @options) end |
Instance Method Details
#apply(file) ⇒ Object
22 23 24 |
# File 'lib/barkdog/client.rb', line 22 def apply(file) walk(file) end |