class SnowAgent::Configuration

Attributes

open_timeout[RW]

Timout when opening connection to the server

read_timeout[RW]

Timeout when waiting for the server to return data in seconds

secret_token[RW]

Secret access token for authentication with SnowmanIO

server[RW]

Base URL of the SnowmanIO server

Public Class Methods

new() click to toggle source
# File lib/snowagent/configuration.rb, line 15
def initialize
  self.server        = ENV['SNOWMANIO_SERVER']
  self.secret_token  = ENV['SNOWMANIO_SECRET_TOKEN']

  self.read_timeout = 30
  self.open_timeout = 30
end

Public Instance Methods

configured?() click to toggle source

Determines if the agent confiured to send metrics.

# File lib/snowagent/configuration.rb, line 24
def configured?
  !server.nil? && !secret_token.nil?
end