userver
C++ Async Framework
Loading...
Searching...
No Matches
entry.hpp
Go to the documentation of this file.
1
#
pragma
once
2
3
/// @file userver/utils/statistics/entry.hpp
4
/// @brief Header with all the types required in component header to use
5
/// statistics (includes @ref utils::statistics::Entry and forward declarations).
6
7
#
include
<
userver
/
utils
/
fast_pimpl
.
hpp
>
8
#
include
<
userver
/
utils
/
statistics
/
fwd
.
hpp
>
9
10
USERVER_NAMESPACE_BEGIN
11
12
namespace
utils
::statistics {
13
14
namespace
impl {
15
enum
class
UnregisteringKind { kManual, kAutomatic };
16
}
17
18
/// @brief Statistics registration holder, used to unregister a metric source before it is destroyed.
19
///
20
/// See @ref utils::statistics::Storage for info on registrations
21
class
[[nodiscard]] Entry
final
{
22
public
:
23
Entry();
24
25
Entry(
const
Entry& other) =
delete
;
26
Entry& operator=(
const
Entry& other) =
delete
;
27
Entry(Entry&& other)
noexcept
;
28
Entry& operator=(Entry&& other)
noexcept
;
29
30
/// Unregisters metric source.
31
~
Entry
();
32
33
/// Unregisters metric source.
34
void
Unregister
()
noexcept
;
35
36
private
:
37
struct
Impl;
38
39
friend
class
Storage;
// in RegisterExtender()
40
41
explicit
Entry(
const
Impl& impl)
noexcept
;
42
43
utils
::FastPimpl<Impl, 16, 8> impl_;
44
};
45
46
}
// namespace utils::statistics
47
48
USERVER_NAMESPACE_END
userver
utils
statistics
entry.hpp
Generated on Mon Mar 23 2026 21:39:05 for userver by
Doxygen
1.13.2