Skip to content

Commit

Permalink
Rename Stack::push_cache to push_idle_cache (#2119)
Browse files Browse the repository at this point in the history
Follow-up from 5d0b226 (#2118)
  • Loading branch information
olix0r authored Jan 5, 2023
1 parent 5d0b226 commit b1be983
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion linkerd/app/core/src/svc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ impl<S> Stack<S> {
self.push_on_service(buffer(name, config))
}

pub fn push_cache<T>(self, idle: Duration) -> Stack<idle_cache::NewIdleCached<T, S>>
pub fn push_idle_cache<T>(self, idle: Duration) -> Stack<idle_cache::NewIdleCached<T, S>>
where
T: Clone + Eq + std::fmt::Debug + std::hash::Hash + Send + Sync + 'static,
S: NewService<T> + 'static,
Expand Down
4 changes: 2 additions & 2 deletions linkerd/app/gateway/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ where
)
.push_buffer("TCP Gateway", &outbound.config().tcp_connection_buffer),
)
.push_cache(outbound.config().discovery_idle_timeout)
.push_idle_cache(outbound.config().discovery_idle_timeout)
.check_new_service::<NameAddr, I>();

// Cache an HTTP gateway service for each destination and HTTP version.
Expand Down Expand Up @@ -188,7 +188,7 @@ where
)
.push_buffer("Gateway", &inbound_config.http_request_buffer),
)
.push_cache(inbound_config.discovery_idle_timeout)
.push_idle_cache(inbound_config.discovery_idle_timeout)
.push_on_service(
svc::layers()
.push(http::Retain::layer())
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/inbound/src/http/router.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ impl<C> Inbound<C> {
.push(rt.metrics.proxy.stack.layer(stack_labels("http", "logical")))
.push_buffer("HTTP Logical", &config.http_request_buffer),
)
.push_cache(config.discovery_idle_timeout)
.push_idle_cache(config.discovery_idle_timeout)
.push_on_service(
svc::layers()
.push(http::Retain::layer())
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/outbound/src/discover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ impl<N> Outbound<N> {
)
.push_buffer("TCP Server", &config.tcp_connection_buffer),
)
.push_cache(config.discovery_idle_timeout)
.push_idle_cache(config.discovery_idle_timeout)
.push(svc::ArcNewService::layer())
.check_new_service::<T, I>()
})
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/outbound/src/http/logical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl<N> Outbound<N> {
.push_buffer("HTTP Logical", http_request_buffer),
)
// TODO(ver) this should not be a generalized time-based evicting cache.
.push_cache(*discovery_idle_timeout);
.push_idle_cache(*discovery_idle_timeout);

// If there's no route, use the logical service directly; otherwise
// use the per-route stack.
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/outbound/src/ingress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ impl Outbound<svc::ArcNewHttp<http::Endpoint>> {
)
// Caches the profile-based stack so that it can be reused across
// multiple requests to the same canonical destination.
.push_cache(*discovery_idle_timeout)
.push_idle_cache(*discovery_idle_timeout)
.push_on_service(
svc::layers()
.push(http::strip_header::request::layer(DST_OVERRIDE_HEADER))
Expand Down
2 changes: 1 addition & 1 deletion linkerd/app/outbound/src/tcp/logical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ impl<C> Outbound<C> {
)
// TODO(ver) Can we replace this evicting cache? The detect
// stack would have to hold/reuse inner stacks.
.push_cache(*discovery_idle_timeout)
.push_idle_cache(*discovery_idle_timeout)
.check_new_service::<Logical, I>()
.instrument(|_: &Logical| debug_span!("tcp"))
.check_new_service::<Logical, I>()
Expand Down

0 comments on commit b1be983

Please sign in to comment.