Github   Telegram
Loading...
Searching...
No Matches
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
11
12USERVER_NAMESPACE_BEGIN
13
14namespace testsuite {
15
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
45class TestpointControl final {
46 public:
49
51 void SetEnabledNames(std::unordered_set<std::string> names);
52
58
63};
64
65} // namespace testsuite
66
67USERVER_NAMESPACE_END