#client #grpc-client #status #tokio #response #starlink-grpc-client #dish-client

starlink-grpc-client

A safe, async, type-safe client for querying Starlink Gen 3 Dishy via gRPC

2 unstable releases

new 0.4.0 May 16, 2025
0.3.2 May 15, 2025

#6 in #grpc-client

31 downloads per month

MIT license

42KB
138 lines

Starlink gRPC Client

A safe, async, and type-safe Rust client for querying status information from a Starlink Gen 3 Dishy via gRPC.


✨ Features

  • ✅ Simple API to query dish status
  • ✅ Fully async with Tokio
  • Type-safe models wrapping raw gRPC responses
  • ✅ Clean error handling with thiserror
  • ✅ Ready for polling integrations or CLI tools

🚀 Getting Started

1. Install Protobuf Compiler

This library requires protoc (Protocol Buffers Compiler) to be installed.

Or set the PROTOC environment variable if you have a custom installation.


2. Add to Your Cargo.toml

[dependencies]
starlink-grpc-client = "0.3.2"

(or whatever the last version is)


3. Example Usage

use starlink_grpc_client::client::DishClient;

#[tokio::main]
async fn main() {
    let mut client = DishClient::connect("http://dishy.starlink.com:9200")
        .await
        .expect("Failed to connect to Dish");

    let status = client.get_status()
        .await
        .expect("Failed to fetch dish status");

    println!("{:#?}", status);
}

✅ See working examples in examples/usage.rs, examples/stream.rs and examples/stream_verbose.rs


📑 Public API Summary

Method Signature Description
connect pub async fn connect(endpoint: &str) -> Result<Self, DishError> Create a new client by dialing the given URL.
get_status pub async fn get_status(&mut self) -> Result<DishStatus, DishError> Perform a single, unary status RPC.
stream_status pub async fn stream_status(&mut self) -> Result<impl Stream<Item = Result<DishStatus, DishError>>, DishError> Poll getStatus once per second, silently.
stream_status_logged pub async fn stream_status_logged(&mut self) -> Result<impl Stream<Item = Result<(DishStatus, Duration), DishError>>, DishError> Poll with outbound logs and true RTT measurement.

🛠️ Features Roadmap

  • Push-based streaming support (server-driven updates)
  • Configurable polling API
  • Prometheus / Grafana integration
  • CLI binary interface
  • JSON serialization helpers

📦 Building From Source

Clone the repository and build:

git clone https://github.com/andywwright/starlink-grpc-client.git
cd starlink-grpc-client
cargo build

✅ Semantic Versioning

This project follows Semantic Versioning 2.0.0:

  • MAJOR: Breaking changes
  • MINOR: Backward-compatible features
  • PATCH: Bug fixes

Current Version: 0.1.0 (Developer Preview)


📝 License

MIT License. See LICENSE for details.


💬 Feedback and Contributions

Dependencies

~7–13MB
~158K SLoC