Crate hyperstack_server

Crate hyperstack_server 

Source
Expand description

§hyperstack-server

WebSocket server and projection handlers for HyperStack streaming pipelines.

This crate provides a builder API for creating HyperStack servers that:

  • Process Solana blockchain data via Yellowstone gRPC
  • Transform data using the HyperStack VM
  • Stream entity updates over WebSockets to connected clients
  • Support multiple streaming modes (State, KV, List, Append)

§Quick Start

use hyperstack_server::{Server, Spec};

#[tokio::main]
async fn main() -> anyhow::Result<()> {
    Server::builder()
        .spec(my_spec())
        .websocket()
        .bind("[::]:8877".parse()?)
        .health_monitoring()
        .start()
        .await
}

§Feature Flags

  • otel - OpenTelemetry integration for metrics and distributed tracing

Re-exports§

pub use bus::BusManager;
pub use bus::BusMessage;
pub use config::HealthConfig;
pub use config::HttpHealthConfig;
pub use config::ServerConfig;
pub use config::WebSocketConfig;
pub use config::YellowstoneConfig;
pub use health::HealthMonitor;
pub use health::StreamStatus;
pub use http_health::HttpHealthServer;
pub use projector::Projector;
pub use runtime::Runtime;
pub use view::Delivery;
pub use view::Filters;
pub use view::Projection;
pub use view::ViewIndex;
pub use view::ViewSpec;
pub use websocket::ClientInfo;
pub use websocket::ClientManager;
pub use websocket::Frame;
pub use websocket::Mode;
pub use websocket::Subscription;
pub use websocket::WebSocketServer;

Modules§

bus
config
health
http_health
projector
runtime
view
websocket

Structs§

Server
Main server interface with fluent builder API
ServerBuilder
Builder for configuring and creating a HyperStack server
Spec
Specification for a HyperStack server Contains bytecode, parsers, and program information

Type Aliases§

ParserSetupFn
Type alias for a parser setup function This function receives a mutations sender and optional health monitor, then sets up the Vixen runtime