diff options
author | Devtools Arcadia <[email protected]> | 2022-02-07 18:08:42 +0300 |
---|---|---|
committer | Devtools Arcadia <[email protected]> | 2022-02-07 18:08:42 +0300 |
commit | 1110808a9d39d4b808aef724c861a2e1a38d2a69 (patch) | |
tree | e26c9fed0de5d9873cce7e00bc214573dc2195b7 /library/cpp/monlib/encode/json/json.h |
intermediate changes
ref:cde9a383711a11544ce7e107a78147fb96cc4029
Diffstat (limited to 'library/cpp/monlib/encode/json/json.h')
-rw-r--r-- | library/cpp/monlib/encode/json/json.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/library/cpp/monlib/encode/json/json.h b/library/cpp/monlib/encode/json/json.h new file mode 100644 index 00000000000..21530f20c37 --- /dev/null +++ b/library/cpp/monlib/encode/json/json.h @@ -0,0 +1,29 @@ +#pragma once + +#include <library/cpp/monlib/encode/encoder.h> +#include <library/cpp/monlib/encode/format.h> + + +class IOutputStream; + +namespace NMonitoring { + + class TJsonDecodeError: public yexception { + }; + + IMetricEncoderPtr EncoderJson(IOutputStream* out, int indentation = 0); + + /// Buffered encoder will merge series with same labels into one. + IMetricEncoderPtr BufferedEncoderJson(IOutputStream* out, int indentation = 0); + + IMetricEncoderPtr EncoderCloudJson(IOutputStream* out, + int indentation = 0, + TStringBuf metricNameLabel = "name"); + + IMetricEncoderPtr BufferedEncoderCloudJson(IOutputStream* out, + int indentation = 0, + TStringBuf metricNameLabel = "name"); + + void DecodeJson(TStringBuf data, IMetricConsumer* c, TStringBuf metricNameLabel = "name"); + +} |