forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
hot_restarting_child.h
33 lines (26 loc) · 961 Bytes
/
hot_restarting_child.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
#pragma once
#include "common/stats/stat_merger.h"
#include "server/hot_restarting_base.h"
namespace Envoy {
namespace Server {
/**
* The child half of hot restarting. Issues requests and commands to the parent.
*/
class HotRestartingChild : HotRestartingBase, Logger::Loggable<Logger::Id::main> {
public:
HotRestartingChild(int base_id, int restart_epoch);
int duplicateParentListenSocket(const std::string& address);
std::unique_ptr<envoy::HotRestartMessage> getParentStats();
void drainParentListeners();
void sendParentAdminShutdownRequest(time_t& original_start_time);
void sendParentTerminateRequest();
void mergeParentStats(Stats::Store& stats_store,
const envoy::HotRestartMessage::Reply::Stats& stats_proto);
private:
const int restart_epoch_;
bool parent_terminated_{};
sockaddr_un parent_address_;
std::unique_ptr<Stats::StatMerger> stat_merger_{};
};
} // namespace Server
} // namespace Envoy