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::AdminStats;pub use commands::AdminStatus;pub use commands::AnswerPlanResult;pub use commands::AnswerPlanSection;pub use commands::ApiKeyCreated;pub use commands::AuthMeResult;pub use commands::BatchDeleteResult;pub use commands::BatchInsertResult;pub use commands::BatchItemResult;pub use commands::BatchSearchResult;pub use commands::BatchUpdateResult;pub use commands::BulkUpdateMetadataRpcResult;pub use commands::CleanupEmptyResult;pub use commands::CollectionInfo;pub use commands::CompressBullet;pub use commands::CopyRpcResult;pub use commands::CreateCollectionResult;pub use commands::DeleteByFilterRpcResult;pub use commands::DiscoverEdgesForNodeResult;pub use commands::DiscoverEdgesResult;pub use commands::DiscoverResult;pub use commands::DiscoveryChunk;pub use commands::EmbedResult;pub use commands::ExpandQueriesResult;pub use commands::GraphDiscoveryStatus;pub use commands::MoveRpcResult;pub use commands::RebalanceStatus;pub use commands::RefreshTokenResult;pub use commands::RenderPromptResult;pub use commands::ReplicationConfigureResult;pub use commands::RotatedApiKey;pub use commands::SearchExplainResult;pub use commands::SearchHit;pub use commands::SearchTrace;pub use commands::SetExpiryResult;pub use commands::SlowQueryConfigResult;pub use commands::ValidatePasswordResult;pub use commands::VectorListResult;pub use commands::VectorWriteResult;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.