Vine/Client/mod.rs
1//! # Vine::Client
2//!
3//! Client-side gRPC wrappers for embedders that need to *call* Vine
4//! services (Air talking to Mountain, Cocoon-Rust talking to Mountain, …).
5//! One entry-point per file:
6//!
7//! - [`MarkShutdown::Fn`] / [`IsShuttingDown::Fn`] - process-wide flag.
8//! - [`NotificationFrame::Struct`] - broadcast payload.
9//! - [`SubscribeNotifications::Fn`] / [`SubscriberCount::Fn`] - fan-out access.
10//! - [`ConnectToSideCar::Fn`] / [`DisconnectFromSideCar::Fn`] - pool lifecycle.
11//! Driven by [`TryConnectSingle::Fn`] (single attempt).
12//! - [`IsClientConnected::Fn`] / [`WaitForClientConnection::Fn`] -
13//! boot-race-friendly readiness checks.
14//! - [`CheckSideCarHealth::Fn`] - pool + metadata health summary.
15//! - [`SendRequest::Fn`] / [`SendNotification::Fn`] - wire dispatch with
16//! optional streaming-multiplexer fast path under `LAND_VINE_STREAMING=1`
17//! when the `multiplexer` cargo feature is enabled.
18//! - [`PublishNotification::Fn`] (private) and
19//! [`PublishNotificationFromMux::Fn`] (`pub(crate)`) - broadcast publishers.
20//! - [`Shared`] - module-private state (statics, helpers, constants).
21//!
22//! ## Behaviours
23//!
24//! - 3-attempt exponential backoff (50 ms / 100 ms / 200 ms base schedule) in
25//! [`ConnectToSideCar::Fn`].
26//! - `Arc<Notify>` connection-ready wake-up (no polling) in
27//! [`WaitForClientConnection::Fn`].
28//! - 5 000 ms unary default timeout, bounded by
29//! [`crate::DefaultRequestTimeoutMs`] at 15 000 ms; per-call override on
30//! [`SendRequest::Fn`].
31//! - Atomic-counter request IDs (`AtomicU64`, no `SystemTime` syscall) in
32//! [`SendRequest::Fn`].
33//! - h2 transport tuning (4 MB stream / 16 MB connection windows;
34//! `LAND_TONIC_TUNED=0` to disable) in [`TryConnectSingle::Fn`].
35
36pub mod CheckSideCarHealth;
37
38pub mod ConnectToSideCar;
39
40pub mod DisconnectFromSideCar;
41
42pub mod IsClientConnected;
43
44pub mod IsShuttingDown;
45
46pub mod MarkShutdown;
47
48pub mod NotificationFrame;
49
50pub mod SendNotification;
51
52pub mod SendRequest;
53
54pub mod SubscribeNotifications;
55
56pub mod SubscriberCount;
57
58pub mod TryConnectSingle;
59
60pub mod WaitForClientConnection;
61
62pub(crate) mod PublishNotification;
63
64pub mod Shared;