Expand description
Module-private state for the Vine client: connection pool, per- connection metadata, the broadcast fan-out, the shutdown flag, plus the constants and message-size validator that every entry-point shares.
Structs§
- CONNECTION_
METADATA - Connection
Metadata - Connection metadata tracking health and last activity.
- NOTIFICATION_
BROADCAST - SIDECAR_
CLIENTS
Constants§
- CONNECTION_
TIMEOUT_ MS - Connection timeout (currently unused - kept for the streaming variant).
- DEFAULT_
TIMEOUT_ MS - Default timeout for RPC calls.
- HEALTH_
CHECK_ INTERVAL_ MS - Health-check interval.
- MAX_
MESSAGE_ SIZE_ BYTES - Maximum message size for validation (4 MB to match the tonic default).
- MAX_
RETRY_ ATTEMPTS - Maximum number of retry attempts for failed connections.
- NOTIFICATION_
BROADCAST_ CAPACITY - Notification broadcast capacity (drop-oldest when full). 4096 covers the worst-case storms (sky://diagnostics/changed at 50-200/s during rust-analyzer cargo-check) with margin.
- RETRY_
BASE_ DELAY_ MS - Base delay between retry attempts.
Statics§
- SHUTDOWN_
FLAG - Process-wide shutdown flag. Set to
trueonce Mountain has issued$shutdown(or SIGKILL’d) Cocoon. After that point allSendNotification/SendRequestcalls short-circuit.
Functions§
- Record
Side CarFailure - Increment the failure counter and mark the connection unhealthy.
- Shutdown
Flag Load - Shutdown
Flag Store - Update
Side CarActivity - Refresh the last-activity timestamp and reset the failure counter.
- Validate
Message Size - Reject messages above
MAX_MESSAGE_SIZE_BYTESto bound the worst-case gRPC frame. Mirrors tonic’s own check so we don’t pay the codec round- trip for an oversize payload.
Type Aliases§
- Cocoon
Client - Cocoon gRPC client over a tonic transport channel.