Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

gRPC API

The Memory Appliance gRPC API provides high-performance bidirectional streaming for real-time memory appliance management.

Features

  • Bidirectional Streaming: Send commands and receive responses in real-time
  • Protocol Buffers: Efficient binary protocol
  • Type Safety: Strongly typed messages
  • Code Generation: Client libraries for multiple languages

Service Overview

service MemoryApplianceService {
  rpc SendCommand (stream SendCommandRequest) returns (stream CommandResponse);
  rpc GetChassis (google.protobuf.Empty) returns (Chassis);
}

Quick Example

use smartforge::generated::memory_appliance::*;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Connect to server
    let mut client = MemoryApplianceServiceClient::connect(
        "http://127.0.0.1:50051"
    ).await?;
    
    // Get chassis info
    let chassis = client.get_chassis(()).await?;
    println!("Chassis: {:?}", chassis);
    
    Ok(())
}

See the full API reference for complete details.