Sha256: 8e8dee4d5645073611cf5452ffecce602cbc714f30fe83dc5681042059725378

Contents?: true

Size: 736 Bytes

Versions: 94

Compression:

Stored size: 736 Bytes

Contents

require 'prometheus/client/registry'
require 'prometheus/client/mmaped_value'
require 'prometheus/client/page_size'
require 'logger'
require 'tmpdir'

module Prometheus
  module Client
    class Configuration
      attr_accessor :value_class, :multiprocess_files_dir, :initial_mmap_file_size, :logger, :pid_provider

      def initialize
        @value_class = ::Prometheus::Client::MmapedValue
        @initial_mmap_file_size = ::Prometheus::Client::PageSize.page_size(fallback_page_size: 4096)
        @logger = Logger.new($stdout)
        @pid_provider = Process.method(:pid)
        @multiprocess_files_dir = ENV.fetch('prometheus_multiproc_dir') do
          Dir.mktmpdir("prometheus-mmap")
        end
      end
    end
  end
end

Version data entries

94 entries across 94 versions & 1 rubygems

Version Path
prometheus-client-mmap-1.1.2 lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.1.2-x86_64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.1.2-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.1.2-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.1.2-aarch64-linux lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6 lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6-x86_64-linux-musl lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6-x86_64-linux-gnu lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6-aarch64-linux-musl lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.6-aarch64-linux-gnu lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5 lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5-x86_64-linux-musl lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5-x86_64-linux-gnu lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5-x86_64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5-arm64-darwin lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5-aarch64-linux-musl lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.5-aarch64-linux-gnu lib/prometheus/client/configuration.rb
prometheus-client-mmap-1.2.4 lib/prometheus/client/configuration.rb