userver
C++ Async Framework
Toggle main menu visibility
Loading...
Searching...
No Matches
testpoint_control.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <functional>
7
#include <optional>
8
#include <string>
9
#include <unordered_set>
10
11
#include <
userver/formats/json_fwd.hpp
>
12
#include <
userver/utils/function_ref.hpp
>
13
14
USERVER_NAMESPACE_BEGIN
15
16
namespace
testsuite
{
17
23
class
TestpointClientBase
{
24
public
:
25
using
Callback = utils::function_ref<void(
const
formats::json::Value
&)>;
26
27
virtual
~TestpointClientBase
();
28
33
virtual
void
Execute
(std::string_view name,
const
formats::json::Value
& json, Callback callback)
const
= 0;
34
35
protected
:
37
void
Unregister
() noexcept;
38
};
39
45
class TestpointControl final {
46
public
:
47
TestpointControl();
48
~TestpointControl();
49
51
void
SetEnabledNames
(std::unordered_set<std::string> names);
52
57
void
SetAllEnabled
();
58
62
void
SetClient
(
TestpointClientBase
& client);
63
};
64
65
}
// namespace testsuite
66
67
USERVER_NAMESPACE_END
userver
testsuite
testpoint_control.hpp
Generated on
for userver by
Doxygen
1.17.0