From 4af9bf9b3e88016d1bf9eb6ef89165507db66b84 Mon Sep 17 00:00:00 2001 From: viralpraxis Date: Fri, 2 Aug 2024 15:23:12 +0300 Subject: [PATCH] Implement no-op `StubClient` --- lib/prometheus_exporter/client.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/prometheus_exporter/client.rb b/lib/prometheus_exporter/client.rb index 2302bd4..cefcb76 100644 --- a/lib/prometheus_exporter/client.rb +++ b/lib/prometheus_exporter/client.rb @@ -283,4 +283,10 @@ def send(json) @collector.process(json) end end + + class StubClient < Client + def send(_json); end + def process_queue; end + def stop(wait_timeout_seconds: 0); end + end end