Sha256: 8922392073583a4150ab6d3a9c0d9a2968a50834e925d48548961518da2338ff

Contents?: true

Size: 423 Bytes

Versions: 10

Compression:

Stored size: 423 Bytes

Contents

# frozen_string_literal: true

module StatsD
  module Instrument
    # @note This class is part of the new Client implementation that is intended
    #   to become the new default in the next major release of this library.
    class NullSink
      def sample?(_sample_rate)
        true
      end

      def <<(_datagram)
        self # noop
      end

      def flush(blocking:)
        # noop
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
statsd-instrument-3.9.7 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.6 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.5 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.4 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.3 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.2 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.1 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.9.0 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.8.0 lib/statsd/instrument/null_sink.rb
statsd-instrument-3.7.0 lib/statsd/instrument/null_sink.rb