Expand description
VectorizerRPC client — length-prefixed MessagePack over raw TCP.
The wire spec at docs/specs/VECTORIZER_RPC.md (in the parent
Vectorizer repo) is the byte-level contract. This module ports the
server-side codec + types byte-for-byte so a v1 server can talk to
a v1 SDK client without translation.
§Quick start
use vectorizer_sdk::rpc::{RpcClient, HelloPayload};
let mut client = RpcClient::connect("127.0.0.1:15503").await?;
client.hello(HelloPayload::new("vectorizer-sdk-rust/3.0.0")).await?;
let pong = client.ping().await?;
assert_eq!(pong, "PONG");§Layout
codec— frame encode/decode (u32 LE len+ MessagePack body).types—Request,Response,VectorizerValuewire types.client—RpcClient: connect, hello, call, ping, close.pool— minimalRpcPool<T>for reusing connections.endpoint—parse_endpoint(url)for the canonicalvectorizer://host[:port]URL scheme.
Re-exports§
pub use client::HelloPayload;pub use client::HelloResponse;pub use client::RpcClient;pub use client::RpcClientError;pub use commands::CollectionInfo;pub use commands::SearchHit;pub use endpoint::Endpoint;pub use endpoint::ParseError;pub use endpoint::parse_endpoint;pub use pool::RpcPool;
Modules§
- client
RpcClient: connect, hello, call, ping, close.- codec
- VectorizerRPC frame codec —
[u32 LE len][MessagePack body]. - commands
- Typed wrappers around the v1 RPC command catalog.
- endpoint
- Canonical URL parser for the SDK’s connection string.
- pool
- Minimal RPC connection pool.
- types
- VectorizerRPC wire types —
Request,Response,VectorizerValue.
Structs§
- Request
- A request from client to server. Wire spec § 2.
- Response
- A response from server to client. Wire spec § 2.
Enums§
- Vectorizer
Value - A dynamically-typed value that can cross the VectorizerRPC wire.