forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hot_restart_nop_impl.h
39 lines (31 loc) · 1.17 KB
/
hot_restart_nop_impl.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
38
39
#pragma once
#include <string>
#include "envoy/server/hot_restart.h"
#include "common/common/thread.h"
namespace Envoy {
namespace Server {
/**
* No-op implementation of HotRestart.
*/
class HotRestartNopImpl : public Server::HotRestart {
public:
HotRestartNopImpl() {}
// Server::HotRestart
void drainParentListeners() override {}
int duplicateParentListenSocket(const std::string&) override { return -1; }
void getParentStats(GetParentStatsInfo& info) override { memset(&info, 0, sizeof(info)); }
void initialize(Event::Dispatcher&, Server::Instance&) override {}
void shutdownParentAdmin(ShutdownParentAdminInfo&) override {}
void terminateParent() override {}
void shutdown() override {}
std::string version() override { return "disabled"; }
Thread::BasicLockable& logLock() override { return log_lock_; }
Thread::BasicLockable& accessLogLock() override { return access_log_lock_; }
Stats::RawStatDataAllocator& statsAllocator() override { return stats_allocator_; }
private:
Thread::MutexBasicLockable log_lock_;
Thread::MutexBasicLockable access_log_lock_;
Stats::HeapRawStatDataAllocator stats_allocator_;
};
} // namespace Server
} // namespace Envoy