Clio
develop
The XRP Ledger API server.
Theme:
Default
Round
Robot
Toggle main menu visibility
Loading...
Searching...
No Matches
Label.hpp
1
#pragma once
2
3
#include <string>
4
#include <vector>
5
6
namespace
util::prometheus
{
7
11
class
Label
{
12
public
:
19
Label
(std::string name, std::string value);
20
21
auto
22
operator<=>(
Label
const
& rhs)
const
=
default
;
23
30
[[nodiscard]] std::string
31
serialize
()
const
;
32
33
private
:
34
std::string name_;
35
std::string value_;
36
};
37
41
class
Labels {
42
public
:
43
Labels() =
default
;
44
50
explicit
Labels(std::vector<Label> labels);
51
58
[[nodiscard]] std::string
59
serialize
()
const
;
60
61
private
:
62
std::vector<Label> labels_;
63
};
64
65
}
// namespace util::prometheus
rpc::Label::Label
Label(std::string name, std::string value)
Construct a new Label object.
Definition
Label.cpp:12
util::prometheus::Label::serialize
std::string serialize() const
Serialize the label to a string in Prometheus format (e.g. name="value"). The value is escaped.
Definition
Label.cpp:17
util::prometheus::Label::Label
Label(std::string name, std::string value)
Construct a new Label object.
Definition
Label.cpp:12
util::prometheus::Labels::serialize
std::string serialize() const
Serialize the labels to a string in Prometheus format (e.g. {"name1="value1",name2="value2"}...
Definition
Label.cpp:48
util::prometheus
Prometheus metrics: counters, gauges, histograms and their registry and serialization.
Definition
Bool.hpp:12
src
util
prometheus
Label.hpp
Generated by
1.17.0