Class: PrometheusExporter::LocalClient
- Defined in:
- lib/prometheus_exporter/client.rb
Constant Summary
Constants inherited from Client
Client::MAX_QUEUE_SIZE, Client::MAX_SOCKET_AGE
Instance Attribute Summary collapse
-
#collector ⇒ Object
readonly
Returns the value of attribute collector.
Instance Method Summary collapse
-
#initialize(collector:, json_serializer: nil, custom_labels: nil) ⇒ LocalClient
constructor
A new instance of LocalClient.
- #send(json) ⇒ Object
Methods inherited from Client
#custom_labels=, default, default=, #process_queue, #register, #send_json, #stop
Constructor Details
#initialize(collector:, json_serializer: nil, custom_labels: nil) ⇒ LocalClient
Returns a new instance of LocalClient.
212 213 214 215 |
# File 'lib/prometheus_exporter/client.rb', line 212 def initialize(collector:, json_serializer: nil, custom_labels: nil) @collector = collector super(json_serializer: json_serializer, custom_labels: custom_labels) end |
Instance Attribute Details
#collector ⇒ Object (readonly)
Returns the value of attribute collector.
210 211 212 |
# File 'lib/prometheus_exporter/client.rb', line 210 def collector @collector end |
Instance Method Details
#send(json) ⇒ Object
217 218 219 |
# File 'lib/prometheus_exporter/client.rb', line 217 def send(json) @collector.process(json) end |