ConnectToSideCar

Function ConnectToSideCar 

Source
pub async fn ConnectToSideCar(
    SideCarIdentifier: String,
    Address: String,
) -> Result<(), VineError>
Expand description

Establishes a gRPC connection to a sidecar process with retry logic.

This function attempts to connect to a Cocoon sidecar at the specified address. It implements exponential backoff retry logic for transient failures and initializes connection metadata for health tracking.

§Parameters

  • SideCarIdentifier: Unique identifier for this sidecar connection
  • Address: Network address in format “host:port”

§Returns

  • Ok(()): Connection successfully established
  • Err(VineError): Connection failed after all retry attempts

§Example

ConnectToSideCar("cocoon-main".to_string(), "127.0.0.1:50052".to_string()).await?;