Sha256: 0f4c7b7264a0e2f5f16e2d105394db7f608aecaedb119a9b9728903248fd3285

Contents?: true

Size: 323 Bytes

Versions: 1

Compression:

Stored size: 323 Bytes

Contents

module TwemproxyExporter
  class Gauge
    def initialize(registry, name, desc)
      @gauge = Prometheus::Client::Gauge.new(name, desc)
      registry.register(@gauge)
    end

    def count(value, labels = {})
      @gauge.set(labels, value)
    end

    def value(labels = {})
      @gauge.get(labels)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
twemproxy_exporter-0.1.1 lib/twemproxy_exporter/gauge.rb