Skip to main content

Module Shared

Module Shared 

Source
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
ConnectionMetadata
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 true once Mountain has issued $shutdown (or SIGKILL’d) Cocoon. After that point all SendNotification / SendRequest calls short-circuit.

Functions§

RecordSideCarFailure
Increment the failure counter and mark the connection unhealthy.
ShutdownFlagLoad
ShutdownFlagStore
UpdateSideCarActivity
Refresh the last-activity timestamp and reset the failure counter.
ValidateMessageSize
Reject messages above MAX_MESSAGE_SIZE_BYTES to 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§

CocoonClient
Cocoon gRPC client over a tonic transport channel.