Skip to main content

Mountain/Vine/Client/
IsClientConnected.rs

1
2//! Whether the named sidecar currently has a live entry in the
3//! connection pool. Cheap read of the shared map; no RPC issued. Useful
4//! for boot-race callers that need to know whether `SendRequest` would
5//! short-circuit *before* paying the serialization + lock-acquire cost.
6
7use crate::Vine::Client::{IsShuttingDown, Shared::SIDECAR_CLIENTS};
8
9pub fn Fn(SideCarIdentifier:&str) -> bool {
10	if IsShuttingDown::Fn() {
11		return false;
12	}
13
14	let Pool = SIDECAR_CLIENTS.lock();
15
16	Pool.contains_key(SideCarIdentifier)
17}