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.
Listener: introduce filter chain context (envoyproxy#9205)
Description: Introduce filter chain context. Goal: Support the future work of adding filter chain without drain the whole listener, and deleting one filter chain by draining only the connection associated with the deleted filter chain. The ListenerFactoryContext should cover FilterChainFactoryContext, and filter chain context should cover the life of all the associated connections referring to the filter chain. In this PR the filter chain contexts are not yet destructed independently. I have follow up PRs to release the power of filter chain contexts. Risk Level: LOW Testing: unit test Addressing envoyproxy#4540 3/N Signed-off-by: Yuchen Dai <silentdai@gmail.com> Signed-off-by: Prakhar Gautam <prakhag@gmail.com>
- Loading branch information
Showing
22 changed files
with
443 additions
and
85 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
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,29 @@ | ||
#pragma once | ||
|
||
#include <memory> | ||
|
||
#include "envoy/api/v2/listener/listener.pb.h" | ||
#include "envoy/common/pure.h" | ||
#include "envoy/server/filter_config.h" | ||
|
||
namespace Envoy { | ||
namespace Server { | ||
|
||
/** | ||
* Handles FilterChainFactoryContext creation. It is used by a listener to add a new filter chain | ||
* without worrying about the lifetime of each factory context. | ||
*/ | ||
class FilterChainFactoryContextCreator { | ||
public: | ||
virtual ~FilterChainFactoryContextCreator() = default; | ||
|
||
/** | ||
* Generate the filter chain factory context from proto. Note the caller does not own the filter | ||
* chain context. | ||
*/ | ||
virtual Configuration::FilterChainFactoryContext& createFilterChainFactoryContext( | ||
const ::envoy::config::listener::v3alpha::FilterChain* const filter_chain) PURE; | ||
}; | ||
|
||
} // namespace Server | ||
} // namespace Envoy |
Oops, something went wrong.