forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hot_restart_nop_impl.h
36 lines (29 loc) · 1.05 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
#pragma once
#include <string>
#include "envoy/server/hot_restart.h"
#include "common/common/thread.h"
#include "common/stats/allocator_impl.h"
namespace Envoy {
namespace Server {
/**
* No-op implementation of HotRestart.
*/
class HotRestartNopImpl : public Server::HotRestart {
public:
// Server::HotRestart
void drainParentListeners() override {}
int duplicateParentListenSocket(const std::string&) override { return -1; }
void initialize(Event::Dispatcher&, Server::Instance&) override {}
void sendParentAdminShutdownRequest(time_t&) override {}
void sendParentTerminateRequest() override {}
ServerStatsFromParent mergeParentStatsIfAny(Stats::StoreRoot&) override { return {}; }
void shutdown() override {}
std::string version() override { return "disabled"; }
Thread::BasicLockable& logLock() override { return log_lock_; }
Thread::BasicLockable& accessLogLock() override { return access_log_lock_; }
private:
Thread::MutexBasicLockable log_lock_;
Thread::MutexBasicLockable access_log_lock_;
};
} // namespace Server
} // namespace Envoy