Skip to main content

Mountain/Vine/
Client.rs

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