blob: c6982996990f9997cd7d1af60d16d980d53cda0f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include <library/cpp/monlib/encode/encoder.h>
#include <library/cpp/monlib/encode/format.h>
#include <util/generic/yexception.h>
namespace NMonitoring {
class TPrometheusDecodeException: public yexception {
};
enum class EPrometheusDecodeMode {
DEFAULT,
RAW
};
struct TPrometheusDecodeSettings {
EPrometheusDecodeMode Mode{EPrometheusDecodeMode::DEFAULT};
};
IMetricEncoderPtr EncoderPrometheus(IOutputStream* out, TStringBuf metricNameLabel = "sensor");
void DecodePrometheus(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel = "sensor", const TPrometheusDecodeSettings& settings = TPrometheusDecodeSettings{});
}
|