forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
server: breaking into base and impl class (envoyproxy#30693)
Also moving out the heap checker for E-M as an example of why we want to do this Risk Level: low Testing: n/a Docs Changes: n/a Release Notes: n/a Signed-off-by: Alyssa Wilk <alyssar@chromium.org>
- Loading branch information
1 parent
a33cde6
commit a9d8eb3
Showing
11 changed files
with
101 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "source/server/instance_impl.h" | ||
|
||
namespace Envoy { | ||
namespace Server { | ||
void InstanceImpl::maybeCreateHeapShrinker() { | ||
heap_shrinker_ = | ||
std::make_unique<Memory::HeapShrinker>(dispatcher(), overloadManager(), *stats().rootScope()); | ||
} | ||
|
||
} // namespace Server | ||
} // namespace Envoy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#pragma once | ||
|
||
#include "source/common/memory/heap_shrinker.h" | ||
#include "source/server/server.h" | ||
|
||
namespace Envoy { | ||
namespace Server { | ||
|
||
// The production server instance, which creates all of the required components. | ||
class InstanceImpl : public InstanceBase { | ||
public: | ||
using InstanceBase::InstanceBase; | ||
|
||
protected: | ||
void maybeCreateHeapShrinker() override; | ||
|
||
private: | ||
std::unique_ptr<Memory::HeapShrinker> heap_shrinker_; | ||
}; | ||
|
||
} // namespace Server | ||
} // namespace Envoy |
Oops, something went wrong.