talos-api-rs 0.2.0

A typed, async, idiomatic Rust client for the Talos Linux gRPC API
Documentation
// SPDX-License-Identifier: MIT OR Apache-2.0

use talos_api_rs::{TalosClient, TalosClientConfig};

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let config = TalosClientConfig::new("http://127.0.0.1:50000");

    println!("Connecting to {}...", config.endpoint);
    // In a real example we would handle the error properly
    // This example expects a running cluster or mock
    match TalosClient::new(config).await {
        Ok(_client) => {
            // let response = client.version().version(...).await?;
            println!("Connected! (Version call not fully implemented in example)");
        }
        Err(e) => {
            eprintln!("Failed to connect: {}", e);
        }
    }

    Ok(())
}