Sha256: e795ba8b323a26a435af90e9494fc586b4f5602c095b02f3736b7e65875ded45

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 Bytes

Contents

require 'logger'

module Lusnoc
  # Methods for configuring Lusnoc
  class Configuration

    attr_accessor :url, :acl_token, :logger, :http_timeout

    # Override defaults for configuration
    # @param url [String] consul's connection URL
    # @param acl_token [String] a connection token used when making requests to consul
    def initialize(url = 'http://localhost:8500', acl_token = nil)
      @url = url
      @acl_token = acl_token
      @logger = Logger.new(STDOUT, level: Logger::INFO, progname: 'Lusnoc')
      @http_timeout = 5
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lusnoc-1.0.1.134629 lib/lusnoc/configuration.rb
lusnoc-1.0.1.81655 lib/lusnoc/configuration.rb