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