userver
C++ Async Framework (beta)
Loading...
Searching...
No Matches
userver
testsuite
testpoint_control.hpp
Go to the documentation of this file.
1
#pragma once
2
5
6
#include <functional>
7
#include <string>
8
#include <unordered_set>
9
10
#include <
userver/formats/json_fwd.hpp
>
11
12
USERVER_NAMESPACE_BEGIN
13
14
namespace
testsuite
{
15
21
class
TestpointClientBase
{
22
public
:
23
using
Callback = std::function<void(
const
formats::json::Value
&)>;
24
25
virtual
~TestpointClientBase
();
26
31
virtual
void
Execute
(
const
std::string& name,
32
const
formats::json::Value
& json,
33
const
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
Generated on Tue Mar 14 2023 16:21:23 for userver by
Doxygen
1.9.6