Mountain/Vine/Client.rs
1
2//! Vine client - thread-safe gRPC client for a Cocoon sidecar process.
3//! Pool of `CocoonClient` connections keyed by identifier, automatic
4//! reconnect with exponential back-off, per-connection health metadata,
5//! per-call timeouts, message-size validation, and a broadcast fan-out
6//! of every observed notification.
7//!
8//! Atomized layout (one entry-point per file):
9//! - `MarkShutdown::Fn` / `IsShuttingDown::Fn` - process-wide flag.
10//! - `NotificationFrame::Struct` - broadcast payload.
11//! - `SubscribeNotifications::Fn` / `SubscriberCount::Fn` - fan-out access.
12//! - `ConnectToSideCar::Fn` / `DisconnectFromSideCar::Fn` - pool lifecycle.
13//! Driven by `TryConnectSingle::Fn` (single attempt).
14//! - `IsClientConnected::Fn` / `WaitForClientConnection::Fn` -
15//! boot-race-friendly readiness checks.
16//! - `CheckSideCarHealth::Fn` - pool + metadata health summary.
17//! - `SendRequest::Fn` / `SendNotification::Fn` - wire dispatch with optional
18//! streaming-multiplexer fast path under `LAND_VINE_STREAMING=1`.
19//! - `PublishNotification::Fn` (private) and `PublishNotificationFromMux::Fn`
20//! (`pub(crate)`) - broadcast publishers.
21//! - `Shared` - module-private state (statics, helpers, constants).
22
23pub mod CheckSideCarHealth;
24
25pub mod ConnectToSideCar;
26
27pub mod DisconnectFromSideCar;
28
29pub mod IsClientConnected;
30
31pub mod IsShuttingDown;
32
33pub mod MarkShutdown;
34
35pub mod NotificationFrame;
36
37pub mod PublishNotificationFromMux;
38
39pub mod SendNotification;
40
41pub mod SendRequest;
42
43pub mod SubscribeNotifications;
44
45pub mod SubscriberCount;
46
47pub mod WaitForClientConnection;
48
49pub(crate) mod PublishNotification;
50
51pub(crate) mod Shared;
52
53pub(crate) mod TryConnectSingle;