Skip to main content

Crate vgi_rpc

Crate vgi_rpc 

Source
Expand description

vgi-rpc — transport-agnostic RPC framework built on Apache Arrow IPC.

This crate provides a server-side implementation compatible with the Python vgi_rpc canonical wire protocol. Clients (pipe/subprocess/unix/http) supplied by other languages can drive a RpcServer transparently.

Re-exports§

pub use access_log::AccessLogHook;
pub use arrow_type::Bytes;
pub use arrow_type::Decimal20_4;
pub use arrow_type::DictString;
pub use arrow_type::FixedBinary;
pub use arrow_type::LargeBytes;
pub use arrow_type::LargeString;
pub use arrow_type::UtcTimestamp;
pub use arrow_type::VgiArrow;
pub use auth::oauth::OAuthResourceMetadata;
pub use auth::chain_all;
pub use auth::chain_authenticate;
pub use auth::AuthContext;
pub use auth::AuthRequest;
pub use auth::AuthResult;
pub use auth::Authenticate;
pub use errors::Result;
pub use errors::RpcError;
pub use hooks::CallStatistics;
pub use hooks::ChainHook;
pub use hooks::DispatchHook;
pub use hooks::DispatchInfo;
pub use hooks::HookToken;
pub use hooks::SharedHook;
pub use introspect::DESCRIBE_METHOD_NAME;
pub use introspect::DESCRIBE_VERSION;
pub use log::LogLevel;
pub use log::LogMessage;
pub use retry::RetryConfig;
pub use server::CallContext;
pub use server::MethodInfo;
pub use server::MethodType;
pub use server::Request;
pub use server::RpcServer;
pub use server::RpcServerBuilder;
pub use server::StickySink;
pub use sticky::DrainHandle;
pub use sticky::SessionRegistry;
pub use stream::ExchangeState;
pub use stream::OutputCollector;
pub use stream::ProducerState;
pub use stream::StreamResult;
pub use transport::ServeStartHook;
pub use transport::TransportCapabilities;
pub use transport::TransportKind;

Modules§

access_log
Structured access logging as a DispatchHook.
arrow_type
VgiArrow — the bridge between idiomatic Rust types and Arrow.
auth
Authentication framework.
crypto
Generic AEAD seal/open primitive (XChaCha20-Poly1305).
errors
Error types used throughout the vgi-rpc framework.
external
External-location batches.
hooks
Dispatch hook interface used by observability integrations.
http
HTTP transport. Implements the vgi-rpc protocol over HTTP: POST /{method} unary POST /{method}/init stream init (producer or exchange) POST /{method}/exchange stream continuation
introspect
__describe__ introspection.
log
Client-directed log messages carried in batch custom_metadata.
metadata
Well-known metadata keys used in the vgi-rpc wire protocol.
retry
Retry helpers.
server
RPC server dispatch — reads requests, invokes handlers, writes responses.
sticky
Sticky-session machinery for the HTTP transport.
stream
Streaming primitives: OutputCollector, ProducerState, ExchangeState, StreamResult.
stream_codec
Serialization codec for streaming state.
transport
Transport identity advertised by a bound [RpcServer].
transport_options
The __transport_options__ RPC method — transport capability negotiation.
unix
AF_UNIX accept loop with optional idle self-termination.
wire
Low-level IPC stream helpers that preserve per-batch custom metadata.

Attribute Macros§

exchange
No-op attribute consumed by #[service]. Standalone use is a compile error in V1.
param
No-op attribute consumed by #[service] for per-parameter metadata.
producer
No-op attribute consumed by #[service]. Standalone use is a compile error in V1.
service
Service-level attribute applied to an impl Block. Scans methods tagged with #[unary], #[producer(...)], or #[exchange(...)] and generates a register_with(server, instance) impl.
unary
No-op attribute consumed by #[service]. Standalone use is a compile error in V1.

Derive Macros§

StreamState
Derive StreamStateCodec (bincode-backed) and supply the encode_state forwarder for ProducerState / ExchangeState.
VgiArrow
Derive VgiArrow for a struct, generating a Struct<fields> Arrow data type plus per-field read / build_singleton wiring.