userver: userver/testsuite/testpoint_control.hpp Source File
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
13
14USERVER_NAMESPACE_BEGIN
15
16namespace testsuite {
17
24public:
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
35protected:
37 void Unregister() noexcept;
38};
39
45class TestpointControl final {
46public:
47 TestpointControl();
48 ~TestpointControl();
49
51 void SetEnabledNames(std::unordered_set<std::string> names);
52
58
63};
64
65} // namespace testsuite
66
67USERVER_NAMESPACE_END