Sha256: 24c00dc4b20614e9598d63b9cc2ab209fd7b36cd1ed0f65736ae41a184c80b95

Contents?: true

Size: 1.03 KB

Versions: 2

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

require 'anyway_config'

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',
                time_precision: 'ns',
                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-1.1.1 lib/influxer/config.rb
influxer-1.1.0 lib/influxer/config.rb