-
Notifications
You must be signed in to change notification settings - Fork 270
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support router-scoped caches (#2128)
`stack::NewRouter` reuses its inner stack for all `Router` instances. This makes it difficult to implement a cache that is scoped just to the router (and not shared across all routers). This change: * Removes the `linkerd_stack::router` module; * Adds the `linkerd-router` crate; * Adds an `ahash` cache implementation to the router crate with a convenience layer; * The `RecognizeRoute` is now called `SelectRoute`; * `Router` is now called `OneshotRoute`; * `NewOneshotRoute` now can use an `ExtractParam` to acquire a `SelectRoute`; and * A `NewCloneService` module is added to support lifting a stack to be shared across routes (i.e. to preserve the prior behavior).
- Loading branch information
Showing
16 changed files
with
395 additions
and
153 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
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,15 @@ | ||
[package] | ||
name = "linkerd-router" | ||
version = "0.1.0" | ||
edition = "2021" | ||
license = "Apache-2.0" | ||
publish = false | ||
|
||
[dependencies] | ||
ahash = "0.8" | ||
futures = { version = "0.3", default-features = false } | ||
parking_lot = "0.12" | ||
thiserror = "1" | ||
tracing = "0.1" | ||
linkerd-error = { path = "../error" } | ||
linkerd-stack = { path = "../stack" } |
Oops, something went wrong.