forked from ydb-platform/nbs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_server.h
37 lines (29 loc) · 806 Bytes
/
test_server.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#pragma once
#include <util/generic/string.h>
#include <memory>
namespace NCloud::NBlockStore::NDiscovery {
////////////////////////////////////////////////////////////////////////////////
class TFakeBlockStoreServer
{
public:
explicit TFakeBlockStoreServer(
ui16 port,
ui16 securePort = 0,
const TString& rootCertsFile = {},
const TString& keyFile = {},
const TString& certFile = {}
);
~TFakeBlockStoreServer();
public:
void ForkStart();
void Start();
ui16 Port() const;
ui16 SecurePort() const;
void SetLastByteCount(ui64 count);
void SetErrorMessage(TString error);
void SetDropPingRequests(bool drop);
private:
struct TImpl;
std::unique_ptr<TImpl> Impl;
};
} // namespace NCloud::NBlockStore::NDiscovery