forked from projectcontour/contour
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/contour: decouple the xDS cache handlers
The `contour.CacheHandler` struct contains the xDS resource caches as embedded members. If we extract a DAG observer interface, however, we can remove knowledge of specific resources from `CacheHandler`. All it really needs is a set of objects that can vist the DAG when it changes to generate any relevant xDS resources, and that can be called on to publish those into the xDS GRPC interface. Separating out the new `contour.ResourceCache` interface gives us the opportunity to add new DAG consumers by only having to modify code when the Contour server starts up. There's no longer any cache handler plumbing needed. Once we can compose the xDS caches under the `Observer` interface, the need for a separate cache handler struct goes away, and we can attach everything we need directly to the event handler. This updates projectcontour#2775. Signed-off-by: James Peach <jpeach@vmware.com>
- Loading branch information
Showing
19 changed files
with
305 additions
and
245 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
Oops, something went wrong.