summaryrefslogtreecommitdiff
path: root/plugins/warp/src/cache
diff options
context:
space:
mode:
authorMason Reed <35282038+emesare@users.noreply.github.com>2026-02-22 20:40:28 -0800
committerGitHub <noreply@github.com>2026-02-22 20:40:28 -0800
commit017349bdbe171c66974a5835f2f74f76138386ea (patch)
tree2e81f92e683f4b1d12c129360c788e0e52217d82 /plugins/warp/src/cache
parente2e420c91147f2a83cf59b37c973f57e209ef67a (diff)
[WARP] Allow containers to be constructed programmatically (#7952)
Diffstat (limited to 'plugins/warp/src/cache')
-rw-r--r--plugins/warp/src/cache/container.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/warp/src/cache/container.rs b/plugins/warp/src/cache/container.rs
index 0b478ed1..99746d9a 100644
--- a/plugins/warp/src/cache/container.rs
+++ b/plugins/warp/src/cache/container.rs
@@ -35,3 +35,8 @@ pub fn cached_containers() -> Vec<Arc<RwLock<Box<dyn Container>>>> {
let containers_cache = CONTAINER_CACHE.get_or_init(Default::default);
containers_cache.iter().map(|c| c.clone()).collect()
}
+
+pub fn cached_container_by_name(name: &str) -> Option<Arc<RwLock<Box<dyn Container>>>> {
+ let containers_cache = CONTAINER_CACHE.get_or_init(Default::default);
+ containers_cache.get(name).map(|c| c.clone())
+}