Sha256: 8961610923ff8f66895997e3fc13b5689ecd9b354375a8ca617ce93cdcdc63dd

Contents?: true

Size: 979 Bytes

Versions: 2

Compression:

Stored size: 979 Bytes

Contents

require 'anyway'

module Influxer
  # Influxer configuration
  class Config < Anyway::Config
    config_name :influxdb

    # influxdb-ruby configuration parameters + cache option
    attr_config :hosts,
                :host,
                :port,
                :username,
                :password,
                :database,
                :time_precision,
                :use_ssl,
                :verify_ssl,
                :ssl_ca_cert,
                :auth_method,
                :initial_delay,
                :max_delay,
                :open_timeout,
                :read_timeout,
                :retry,
                :prefix,
                :denormalize,
                :udp,
                :async,
                database: 'db',
                cache: false

    def load
      super
      # we want pass @cache value as options to cache store, so we want it to be a Hash
      @cache = {}.with_indifferent_access if @cache == true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
influxer-0.4.0 lib/influxer/config.rb
influxer-0.3.1 lib/influxer/config.rb