pub struct RpcClient { /* private fields */ }Expand description
One connection to a Vectorizer RPC server.
Implementations§
Source§impl RpcClient
impl RpcClient
Sourcepub async fn connect_url(url: &str) -> Result<Self>
pub async fn connect_url(url: &str) -> Result<Self>
Convenience: parse a vectorizer://host[:port] URL and dial.
Accepts every form documented at
crate::rpc::endpoint::parse_endpoint:
vectorizer://host:port→ RPC on the given port.vectorizer://host→ RPC on the default port 15503.host:port(no scheme) → RPC.http(s)://...→ returnsRpcClientError::Connectionwith a clear message asking the caller to use the HTTP client instead. The SDK ships thehttpCargo feature for that path; anhttp://URL is not a transport an RPC client can speak.
Sourcepub async fn connect(addr: impl AsRef<str>) -> Result<Self>
pub async fn connect(addr: impl AsRef<str>) -> Result<Self>
Dial addr — host:port, or any form thunder::parse_endpoint
accepts. Does NOT authenticate: pass credentials to Self::hello,
which re-dials with them in the handshake.
Sourcepub async fn with_timeout(&self, timeout: Duration) -> Result<()>
pub async fn with_timeout(&self, timeout: Duration) -> Result<()>
Per-call and connect timeout for this connection. Re-dials so the new timeouts apply to the live connection as well as later ones.
Sourcepub async fn hello(&self, payload: HelloPayload) -> Result<HelloResponse>
pub async fn hello(&self, payload: HelloPayload) -> Result<HelloResponse>
Issue the HELLO handshake and return the server’s capability list
and auth flags.
When payload carries a token or an API key, the connection is
re-dialed so those credentials travel in Thunder’s AUTH handshake —
that is what authenticates the session every later command runs under.
A credential-free payload reuses the existing connection.
Sourcepub async fn ping(&self) -> Result<String>
pub async fn ping(&self) -> Result<String>
Health check. PING is auth-exempt, so this works before HELLO; the
typed wrapper still validates the response shape.
Sourcepub async fn call(
&self,
command: impl Into<String>,
args: Vec<VectorizerValue>,
) -> Result<VectorizerValue>
pub async fn call( &self, command: impl Into<String>, args: Vec<VectorizerValue>, ) -> Result<VectorizerValue>
Generic call dispatcher. Most callers should use a typed
wrapper from crate::rpc::commands instead.
Concurrent calls multiplex over the one connection; the server gates
un-authenticated sessions, surfacing
RpcClientError::NotAuthenticated.
Sourcepub fn is_authenticated(&self) -> bool
pub fn is_authenticated(&self) -> bool
Returns true once the connection’s handshake authenticated. Always
false against an open (single-user) server, which authenticates
nobody because it gates nothing.
Sourcepub async fn close(self)
pub async fn close(self)
Close the connection. In-flight calls receive
RpcClientError::Connection.
Source§impl RpcClient
impl RpcClient
Sourcepub async fn list_collections(&self) -> Result<Vec<String>>
pub async fn list_collections(&self) -> Result<Vec<String>>
collections.list — return every collection name visible to
the authenticated principal.
Sourcepub async fn get_collection_info(&self, name: &str) -> Result<CollectionInfo>
pub async fn get_collection_info(&self, name: &str) -> Result<CollectionInfo>
collections.get_info — return metadata for one collection.
Sourcepub async fn create_collection(
&self,
name: &str,
config: VectorizerValue,
) -> Result<CreateCollectionResult>
pub async fn create_collection( &self, name: &str, config: VectorizerValue, ) -> Result<CreateCollectionResult>
collections.create — create a new collection.
config is a Map with optional keys dimension (Int) and
metric (Str: "cosine" | "euclidean" | "dot").
Sourcepub async fn delete_collection(&self, name: &str) -> Result<bool>
pub async fn delete_collection(&self, name: &str) -> Result<bool>
collections.delete — delete a collection (admin-gated on server).
Sourcepub async fn list_empty_collections(&self) -> Result<Vec<String>>
pub async fn list_empty_collections(&self) -> Result<Vec<String>>
collections.list_empty — list collections that contain zero vectors.
Sourcepub async fn cleanup_empty_collections(
&self,
dry_run: bool,
) -> Result<CleanupEmptyResult>
pub async fn cleanup_empty_collections( &self, dry_run: bool, ) -> Result<CleanupEmptyResult>
collections.cleanup_empty — remove empty collections.
Pass dry_run: true to preview which collections would be removed
without actually deleting them.
Sourcepub async fn force_save_collection(&self, name: &str) -> Result<bool>
pub async fn force_save_collection(&self, name: &str) -> Result<bool>
collections.force_save — flush a collection’s in-memory state to disk.
Source§impl RpcClient
impl RpcClient
Sourcepub async fn get_vector(
&self,
collection: &str,
vector_id: &str,
) -> Result<VectorizerValue>
pub async fn get_vector( &self, collection: &str, vector_id: &str, ) -> Result<VectorizerValue>
vectors.get — fetch one vector by id. Returns the raw
VectorizerValue::Map so callers can read whichever fields
they care about (id, data, payload, document_id).
Sourcepub async fn insert_vector(
&self,
collection: &str,
id: Option<&str>,
data: Vec<f32>,
payload: Option<VectorizerValue>,
) -> Result<VectorWriteResult>
pub async fn insert_vector( &self, collection: &str, id: Option<&str>, data: Vec<f32>, payload: Option<VectorizerValue>, ) -> Result<VectorWriteResult>
vectors.insert — insert one pre-computed vector.
data must match the collection’s configured dimension.
payload is an optional VectorizerValue::Map of metadata.
Sourcepub async fn insert_text_vector(
&self,
collection: &str,
id: Option<&str>,
text: &str,
payload: Option<VectorizerValue>,
) -> Result<VectorWriteResult>
pub async fn insert_text_vector( &self, collection: &str, id: Option<&str>, text: &str, payload: Option<VectorizerValue>, ) -> Result<VectorWriteResult>
vectors.insert_text — embed text server-side and insert.
The server auto-creates the collection if it does not exist.
Sourcepub async fn update_vector(
&self,
collection: &str,
id: &str,
data: Vec<f32>,
payload: Option<VectorizerValue>,
) -> Result<VectorWriteResult>
pub async fn update_vector( &self, collection: &str, id: &str, data: Vec<f32>, payload: Option<VectorizerValue>, ) -> Result<VectorWriteResult>
vectors.update — replace a vector’s data and/or payload.
Sourcepub async fn delete_vector_rpc(
&self,
collection: &str,
id: &str,
) -> Result<bool>
pub async fn delete_vector_rpc( &self, collection: &str, id: &str, ) -> Result<bool>
vectors.delete — delete one vector by id.
Sourcepub async fn list_vectors(
&self,
collection: &str,
page: i64,
limit: i64,
) -> Result<VectorListResult>
pub async fn list_vectors( &self, collection: &str, page: i64, limit: i64, ) -> Result<VectorListResult>
vectors.list — page through vectors in a collection.
page is zero-based; limit is capped at 50 by the server.
Sourcepub async fn embed_text(
&self,
text: &str,
model: Option<&str>,
) -> Result<EmbedResult>
pub async fn embed_text( &self, text: &str, model: Option<&str>, ) -> Result<EmbedResult>
vectors.embed — embed text server-side and return the embedding.
Sourcepub async fn batch_insert_vectors(
&self,
collection: &str,
items: Vec<VectorizerValue>,
) -> Result<BatchInsertResult>
pub async fn batch_insert_vectors( &self, collection: &str, items: Vec<VectorizerValue>, ) -> Result<BatchInsertResult>
vectors.batch_insert — insert multiple pre-computed vectors.
Each item in items is a VectorizerValue::Map with at least
data (Array<Float>) and optionally id (Str) and payload
(Map).
Sourcepub async fn batch_insert_texts(
&self,
collection: &str,
items: Vec<VectorizerValue>,
) -> Result<BatchInsertResult>
pub async fn batch_insert_texts( &self, collection: &str, items: Vec<VectorizerValue>, ) -> Result<BatchInsertResult>
vectors.batch_insert_texts — embed and insert multiple text items.
Each item in items is a VectorizerValue::Map with at least
text (Str) and optionally id (Str) and payload (Map).
Sourcepub async fn batch_search(
&self,
requests: Vec<VectorizerValue>,
) -> Result<Vec<BatchSearchResult>>
pub async fn batch_search( &self, requests: Vec<VectorizerValue>, ) -> Result<Vec<BatchSearchResult>>
vectors.batch_search — run multiple searches in one round-trip.
Each request in requests is a VectorizerValue::Map with
collection (Str), query (Str), and optional limit (Int).
Sourcepub async fn batch_update_vectors(
&self,
collection: &str,
updates: Vec<VectorizerValue>,
) -> Result<BatchUpdateResult>
pub async fn batch_update_vectors( &self, collection: &str, updates: Vec<VectorizerValue>, ) -> Result<BatchUpdateResult>
vectors.batch_update — update multiple vectors’ data and/or payload.
Each item in updates is a VectorizerValue::Map with id (Str)
and optionally data (Array<Float>) and payload (Map).
Sourcepub async fn batch_delete_vectors(
&self,
collection: &str,
ids: Vec<String>,
) -> Result<BatchDeleteResult>
pub async fn batch_delete_vectors( &self, collection: &str, ids: Vec<String>, ) -> Result<BatchDeleteResult>
vectors.batch_delete — delete multiple vectors by id.
Sourcepub async fn move_vectors_rpc(
&self,
src: &str,
dst: &str,
ids: Vec<String>,
) -> Result<MoveRpcResult>
pub async fn move_vectors_rpc( &self, src: &str, dst: &str, ids: Vec<String>, ) -> Result<MoveRpcResult>
vectors.move — move vectors from src to dst collection.
Named move_vectors_rpc to avoid collision with the REST SDK’s
move_to_collection.
Sourcepub async fn copy_vectors_rpc(
&self,
src: &str,
dst: &str,
ids: Vec<String>,
) -> Result<CopyRpcResult>
pub async fn copy_vectors_rpc( &self, src: &str, dst: &str, ids: Vec<String>, ) -> Result<CopyRpcResult>
vectors.copy — copy vectors from src to dst without deleting.
Sourcepub async fn delete_by_filter_rpc(
&self,
collection: &str,
filter: VectorizerValue,
) -> Result<DeleteByFilterRpcResult>
pub async fn delete_by_filter_rpc( &self, collection: &str, filter: VectorizerValue, ) -> Result<DeleteByFilterRpcResult>
vectors.delete_by_filter — delete all vectors matching a Qdrant-style
filter predicate.
filter is a VectorizerValue::Map matching the Qdrant filter schema.
Sourcepub async fn bulk_update_metadata_rpc(
&self,
collection: &str,
filter: VectorizerValue,
patch: VectorizerValue,
) -> Result<BulkUpdateMetadataRpcResult>
pub async fn bulk_update_metadata_rpc( &self, collection: &str, filter: VectorizerValue, patch: VectorizerValue, ) -> Result<BulkUpdateMetadataRpcResult>
vectors.bulk_update_metadata — apply a JSON-merge-patch to all
vectors matching filter.
filter selects the target vectors; patch is applied via RFC 7396
merge-patch.
Sourcepub async fn set_vector_expiry(
&self,
collection: &str,
id: &str,
expires_at: &str,
) -> Result<SetExpiryResult>
pub async fn set_vector_expiry( &self, collection: &str, id: &str, expires_at: &str, ) -> Result<SetExpiryResult>
vectors.set_expiry — attach a TTL to one vector.
expires_at may be a Unix millisecond timestamp or an RFC3339 string.
Source§impl RpcClient
impl RpcClient
Sourcepub async fn search_basic(
&self,
collection: &str,
query: &str,
limit: usize,
) -> Result<Vec<SearchHit>>
pub async fn search_basic( &self, collection: &str, query: &str, limit: usize, ) -> Result<Vec<SearchHit>>
search.basic — search collection for query and return up
to limit hits sorted by descending similarity.
Sourcepub async fn search_intelligent(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn search_intelligent( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
search.intelligent — multi-collection intelligent search.
request is a VectorizerValue::Map with at minimum query (Str)
and optionally collections (Array<Str>), max_results (Int),
domain_expansion (Bool).
Sourcepub async fn search_by_text(
&self,
collection: &str,
query: &str,
limit: usize,
) -> Result<Vec<SearchHit>>
pub async fn search_by_text( &self, collection: &str, query: &str, limit: usize, ) -> Result<Vec<SearchHit>>
search.by_text — search one collection by text query.
Sourcepub async fn search_by_file(
&self,
collection: &str,
request: VectorizerValue,
) -> Result<Vec<SearchHit>>
pub async fn search_by_file( &self, collection: &str, request: VectorizerValue, ) -> Result<Vec<SearchHit>>
search.by_file — file-content-based search.
request is a VectorizerValue::Map describing the file query.
The server currently returns an empty result set (stub surface);
this method is provided for forward-compatibility.
Sourcepub async fn search_hybrid(
&self,
collection: &str,
request: VectorizerValue,
) -> Result<Vec<SearchHit>>
pub async fn search_hybrid( &self, collection: &str, request: VectorizerValue, ) -> Result<Vec<SearchHit>>
search.hybrid — RRF / weighted-combination hybrid dense+sparse search.
request is a VectorizerValue::Map with at minimum query (Str)
and optional keys alpha, dense_k, sparse_k, final_k,
algorithm ("rrf" | "weighted" | "alpha").
Sourcepub async fn search_semantic(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn search_semantic( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
search.semantic — semantic re-ranking search.
request is a VectorizerValue::Map with query (Str),
collection (Str), and optional max_results, semantic_reranking,
cross_encoder_reranking, similarity_threshold.
Sourcepub async fn search_contextual(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn search_contextual( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
search.contextual — context-filtered semantic search.
request is a VectorizerValue::Map with query (Str),
collection (Str), and optional context_filters (Map),
max_results, context_weight, context_reranking.
Sourcepub async fn search_multi_collection(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn search_multi_collection( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
search.multi_collection — fan-out search across multiple collections.
request is a VectorizerValue::Map with query (Str),
collections (Array<Str>), and optional max_per_collection,
max_total_results, cross_collection_reranking.
Sourcepub async fn search_explain(
&self,
collection: &str,
request: VectorizerValue,
) -> Result<SearchExplainResult>
pub async fn search_explain( &self, collection: &str, request: VectorizerValue, ) -> Result<SearchExplainResult>
search.explain — run a vector search and return HNSW traversal trace.
collection is the target collection; request must contain
vector (Array<Float>) and optionally k (Int).
Source§impl RpcClient
impl RpcClient
Sourcepub async fn discover(&self, request: VectorizerValue) -> Result<DiscoverResult>
pub async fn discover(&self, request: VectorizerValue) -> Result<DiscoverResult>
discovery.discover — full discovery pipeline: embed → search →
compress → build plan → render prompt.
request must contain query (Str) and optionally
include_collections, exclude_collections (Array<Str>),
max_bullets (Int).
Sourcepub async fn filter_collections(
&self,
request: VectorizerValue,
) -> Result<Vec<String>>
pub async fn filter_collections( &self, request: VectorizerValue, ) -> Result<Vec<String>>
discovery.filter_collections — filter collection list by query
relevance.
request must contain query (Str) and optionally include /
exclude (Array<Str>).
Sourcepub async fn score_collections(
&self,
request: VectorizerValue,
) -> Result<Vec<ScoredCollection>>
pub async fn score_collections( &self, request: VectorizerValue, ) -> Result<Vec<ScoredCollection>>
discovery.score_collections — score all collections for a query.
request must contain query (Str).
Sourcepub async fn expand_queries(
&self,
request: VectorizerValue,
) -> Result<ExpandQueriesResult>
pub async fn expand_queries( &self, request: VectorizerValue, ) -> Result<ExpandQueriesResult>
discovery.expand_queries — generate query variants via baseline expansion.
request must contain query (Str) and optionally
max_expansions (Int), include_definition, include_features,
include_architecture (Bool).
Sourcepub async fn broad_discovery(
&self,
request: VectorizerValue,
) -> Result<Vec<DiscoveryChunk>>
pub async fn broad_discovery( &self, request: VectorizerValue, ) -> Result<Vec<DiscoveryChunk>>
discovery.broad_discovery — multi-query broad search across all
collections.
request must contain queries (Array<Str>) and optionally
k (Int).
Sourcepub async fn semantic_focus(
&self,
request: VectorizerValue,
) -> Result<Vec<DiscoveryChunk>>
pub async fn semantic_focus( &self, request: VectorizerValue, ) -> Result<Vec<DiscoveryChunk>>
discovery.semantic_focus — deep semantic search within one collection.
request must contain collection (Str), queries
(Array<Str>), and optionally k (Int).
Sourcepub async fn promote_readme(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn promote_readme( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
discovery.promote_readme — promote README chunks to the top of a
chunk set.
request must contain chunks (Array<Map>) where each map has
collection, doc_id, content, score, file_path,
chunk_index, file_extension.
Sourcepub async fn compress_evidence(
&self,
request: VectorizerValue,
) -> Result<Vec<CompressBullet>>
pub async fn compress_evidence( &self, request: VectorizerValue, ) -> Result<Vec<CompressBullet>>
discovery.compress_evidence — compress a chunk set into ranked bullets.
request must contain chunks (Array<Map>) and optionally
max_bullets (Int), max_per_doc (Int).
Sourcepub async fn build_answer_plan(
&self,
request: VectorizerValue,
) -> Result<AnswerPlanResult>
pub async fn build_answer_plan( &self, request: VectorizerValue, ) -> Result<AnswerPlanResult>
discovery.build_answer_plan — organise bullets into a structured
answer plan.
request must contain bullets (Array<Map>), each with text,
source_id, score, category.
Sourcepub async fn render_llm_prompt(
&self,
request: VectorizerValue,
) -> Result<RenderPromptResult>
pub async fn render_llm_prompt( &self, request: VectorizerValue, ) -> Result<RenderPromptResult>
discovery.render_llm_prompt — render an answer plan into an LLM
prompt string.
request must contain plan (Map) with sections (Array<Map>)
and optionally total_bullets, sources.
Source§impl RpcClient
impl RpcClient
Sourcepub async fn file_content(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn file_content( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
file.content — retrieve raw file content stored in a collection.
request must contain collection (Str) and file_path (Str),
and optionally max_size_kb (Int).
Sourcepub async fn file_list(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn file_list( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
file.list — list files indexed in a collection.
request must contain collection (Str) and optionally
filter_by_type (Array<Str>), min_chunks (Int),
max_results (Int), sort_by (Str).
Sourcepub async fn file_summary(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn file_summary( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
file.summary — extractive or structural summary of one file.
request must contain collection (Str), file_path (Str), and
optionally summary_type ("extractive" | "structural" | "both"),
max_sentences (Int).
Sourcepub async fn file_chunks(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn file_chunks( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
file.chunks — retrieve ordered chunks for one file.
request must contain collection (Str), file_path (Str), and
optionally start_chunk (Int), limit (Int),
include_context (Bool).
Sourcepub async fn file_outline(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn file_outline( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
file.outline — directory-tree outline of a collection’s files.
request must contain collection (Str) and optionally
max_depth (Int), include_summaries (Bool),
highlight_key_files (Bool).
file.related — find files semantically related to a given file.
request must contain collection (Str), file_path (Str), and
optionally limit (Int), similarity_threshold (Float),
include_reason (Bool).
Sourcepub async fn file_search_by_type(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn file_search_by_type( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
file.search_by_type — search within files of specific extension types.
request must contain collection (Str), query (Str),
file_types (Array<Str>), and optionally limit (Int),
return_full_files (Bool).
Source§impl RpcClient
impl RpcClient
Sourcepub async fn graph_list_nodes(
&self,
collection: &str,
) -> Result<VectorizerValue>
pub async fn graph_list_nodes( &self, collection: &str, ) -> Result<VectorizerValue>
graph.list_nodes — list all graph nodes in a collection.
Sourcepub async fn graph_neighbors(
&self,
collection: &str,
node_id: &str,
) -> Result<VectorizerValue>
pub async fn graph_neighbors( &self, collection: &str, node_id: &str, ) -> Result<VectorizerValue>
graph.neighbors — fetch direct neighbors of a graph node.
graph.find_related — find nodes reachable within max_hops of a node.
Sourcepub async fn graph_find_path(
&self,
collection: &str,
from: &str,
to: &str,
) -> Result<VectorizerValue>
pub async fn graph_find_path( &self, collection: &str, from: &str, to: &str, ) -> Result<VectorizerValue>
graph.find_path — shortest path between two graph nodes.
Sourcepub async fn graph_create_edge(
&self,
collection: &str,
edge: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn graph_create_edge( &self, collection: &str, edge: VectorizerValue, ) -> Result<VectorizerValue>
graph.create_edge — create a directed edge between two nodes.
edge is a VectorizerValue::Map with source (Str), target
(Str), relationship_type (Str), and optionally weight
(Float).
Sourcepub async fn graph_delete_edge(
&self,
collection: &str,
edge_id: &str,
) -> Result<VectorizerValue>
pub async fn graph_delete_edge( &self, collection: &str, edge_id: &str, ) -> Result<VectorizerValue>
graph.delete_edge — remove an edge by its id.
Sourcepub async fn graph_list_edges(
&self,
collection: &str,
) -> Result<VectorizerValue>
pub async fn graph_list_edges( &self, collection: &str, ) -> Result<VectorizerValue>
graph.list_edges — list all edges in a collection’s graph.
Sourcepub async fn graph_discover_edges(
&self,
collection: &str,
request: VectorizerValue,
) -> Result<DiscoverEdgesResult>
pub async fn graph_discover_edges( &self, collection: &str, request: VectorizerValue, ) -> Result<DiscoverEdgesResult>
graph.discover_edges — auto-discover edges by vector similarity
across the whole collection.
request is an optional VectorizerValue::Map with
similarity_threshold (Float) and max_per_node (Int).
Sourcepub async fn graph_discover_edges_for_node(
&self,
collection: &str,
node_id: &str,
request: VectorizerValue,
) -> Result<DiscoverEdgesForNodeResult>
pub async fn graph_discover_edges_for_node( &self, collection: &str, node_id: &str, request: VectorizerValue, ) -> Result<DiscoverEdgesForNodeResult>
graph.discover_edges_for_node — auto-discover edges for one node.
request is an optional VectorizerValue::Map with
similarity_threshold (Float) and max_per_node (Int).
Sourcepub async fn graph_discovery_status(
&self,
collection: &str,
) -> Result<GraphDiscoveryStatus>
pub async fn graph_discovery_status( &self, collection: &str, ) -> Result<GraphDiscoveryStatus>
graph.discovery_status — percentage of nodes that have edges.
Source§impl RpcClient
impl RpcClient
Sourcepub async fn admin_stats(&self) -> Result<AdminStats>
pub async fn admin_stats(&self) -> Result<AdminStats>
admin.stats — aggregate vector/collection counts.
Sourcepub async fn admin_status(&self) -> Result<AdminStatus>
pub async fn admin_status(&self) -> Result<AdminStatus>
admin.status — readiness probe and basic counts.
Sourcepub async fn admin_logs(
&self,
request: Option<VectorizerValue>,
) -> Result<VectorizerValue>
pub async fn admin_logs( &self, request: Option<VectorizerValue>, ) -> Result<VectorizerValue>
admin.logs — in-process log entries (the server currently returns
empty; use the REST /logs endpoint for live streaming).
Sourcepub async fn admin_indexing_progress(&self) -> Result<VectorizerValue>
pub async fn admin_indexing_progress(&self) -> Result<VectorizerValue>
admin.indexing_progress — how many collections have been indexed.
Sourcepub async fn admin_config_get(&self) -> Result<VectorizerValue>
pub async fn admin_config_get(&self) -> Result<VectorizerValue>
admin.config_get — read the server’s config.yml.
Sourcepub async fn admin_config_update(&self, patch: VectorizerValue) -> Result<bool>
pub async fn admin_config_update(&self, patch: VectorizerValue) -> Result<bool>
admin.config_update — write a patch map to config.yml (admin).
patch is a VectorizerValue::Map of config keys to new values.
Sourcepub async fn admin_backups_list(&self) -> Result<VectorizerValue>
pub async fn admin_backups_list(&self) -> Result<VectorizerValue>
admin.backups_list — list available backup files.
Sourcepub async fn admin_backups_create(
&self,
request: VectorizerValue,
) -> Result<String>
pub async fn admin_backups_create( &self, request: VectorizerValue, ) -> Result<String>
admin.backups_create — create a backup (admin).
request must contain name (Str) and optionally collections
(Array<Str>).
Sourcepub async fn admin_backups_restore(
&self,
request: VectorizerValue,
) -> Result<bool>
pub async fn admin_backups_restore( &self, request: VectorizerValue, ) -> Result<bool>
admin.backups_restore — restore a backup by id (admin).
request must contain backup_id (Str).
Sourcepub async fn admin_workspaces_list(&self) -> Result<VectorizerValue>
pub async fn admin_workspaces_list(&self) -> Result<VectorizerValue>
admin.workspaces_list — list configured workspaces.
Sourcepub async fn admin_workspace_get(&self) -> Result<VectorizerValue>
pub async fn admin_workspace_get(&self) -> Result<VectorizerValue>
admin.workspace_get — read workspace.yml.
Sourcepub async fn admin_workspace_add(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn admin_workspace_add( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
admin.workspace_add — register a new workspace directory (admin).
request must contain path (Str) and collection_name (Str).
Sourcepub async fn admin_workspace_remove(&self, name: &str) -> Result<bool>
pub async fn admin_workspace_remove(&self, name: &str) -> Result<bool>
admin.workspace_remove — remove a workspace by name (admin).
Sourcepub async fn admin_restart(&self) -> Result<bool>
pub async fn admin_restart(&self) -> Result<bool>
admin.restart — schedule a server restart (admin).
Sourcepub async fn admin_slow_queries_list(&self) -> Result<VectorizerValue>
pub async fn admin_slow_queries_list(&self) -> Result<VectorizerValue>
admin.slow_queries_list — retrieve the slow-query ring buffer.
Sourcepub async fn admin_slow_queries_config(
&self,
config: VectorizerValue,
) -> Result<SlowQueryConfigResult>
pub async fn admin_slow_queries_config( &self, config: VectorizerValue, ) -> Result<SlowQueryConfigResult>
admin.slow_queries_config — configure slow-query threshold and
ring-buffer capacity.
config must contain threshold_ms (Int) and optionally
capacity (Int).
Source§impl RpcClient
impl RpcClient
Sourcepub async fn auth_me(&self) -> Result<AuthMeResult>
pub async fn auth_me(&self) -> Result<AuthMeResult>
auth.me — return the authenticated principal’s identity.
Sourcepub async fn auth_logout(&self, token: &str) -> Result<VectorizerValue>
pub async fn auth_logout(&self, token: &str) -> Result<VectorizerValue>
auth.logout — blacklist the supplied JWT so it cannot be reused.
Sourcepub async fn auth_refresh_token(
&self,
token: &str,
) -> Result<RefreshTokenResult>
pub async fn auth_refresh_token( &self, token: &str, ) -> Result<RefreshTokenResult>
auth.refresh_token — exchange a valid JWT for a fresh one.
Sourcepub async fn auth_validate_password(
&self,
password: &str,
) -> Result<ValidatePasswordResult>
pub async fn auth_validate_password( &self, password: &str, ) -> Result<ValidatePasswordResult>
auth.validate_password — check a plaintext password against the
server’s password policy.
Sourcepub async fn auth_api_keys_create(
&self,
request: VectorizerValue,
) -> Result<ApiKeyCreated>
pub async fn auth_api_keys_create( &self, request: VectorizerValue, ) -> Result<ApiKeyCreated>
auth.api_keys_create — create a new API key.
request must contain name (Str) and optionally expires_in
(Int, seconds) and permissions (Array<Str>).
Sourcepub async fn auth_api_keys_list(&self) -> Result<VectorizerValue>
pub async fn auth_api_keys_list(&self) -> Result<VectorizerValue>
auth.api_keys_list — list API keys for the current principal.
Sourcepub async fn auth_api_keys_revoke(&self, key_id: &str) -> Result<bool>
pub async fn auth_api_keys_revoke(&self, key_id: &str) -> Result<bool>
auth.api_keys_revoke — permanently revoke an API key by id.
Sourcepub async fn rotate_api_key_rpc(&self, key_id: &str) -> Result<RotatedApiKey>
pub async fn rotate_api_key_rpc(&self, key_id: &str) -> Result<RotatedApiKey>
auth.api_keys_rotate — rotate an API key (5-minute grace period).
Named rotate_api_key_rpc to avoid collision with the REST SDK’s
rotate_api_key.
Sourcepub async fn auth_api_keys_create_scoped(
&self,
request: VectorizerValue,
) -> Result<ApiKeyCreated>
pub async fn auth_api_keys_create_scoped( &self, request: VectorizerValue, ) -> Result<ApiKeyCreated>
auth.api_keys_create_scoped — create a collection-scoped API key.
request must contain name (Str) and optionally expires_in
(Int), permissions (Array<Str>), scopes (Array<Map>).
Sourcepub async fn auth_users_create(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn auth_users_create( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
auth.users_create — create a user (admin; returns server error in
v1 — RpcState does not carry AuthHandlerState; use the REST endpoint).
Sourcepub async fn auth_users_list(&self) -> Result<VectorizerValue>
pub async fn auth_users_list(&self) -> Result<VectorizerValue>
auth.users_list — list users (admin; returns server error in v1).
Sourcepub async fn auth_users_delete(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn auth_users_delete( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
auth.users_delete — delete a user (admin; returns server error in v1).
Sourcepub async fn auth_users_change_password(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn auth_users_change_password( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
auth.users_change_password — change a user’s password (returns
server error in v1 — use REST).
Sourcepub async fn auth_introspect(&self, token: &str) -> Result<VectorizerValue>
pub async fn auth_introspect(&self, token: &str) -> Result<VectorizerValue>
auth.introspect — inspect a token’s claims and blacklist status.
Sourcepub async fn auth_audit(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn auth_audit( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
auth.audit — query the auth audit log.
request is an optional VectorizerValue::Map with from (Str),
to (Str), actor (Str), action (Str), limit (Int).
Source§impl RpcClient
impl RpcClient
Sourcepub async fn replication_status(&self) -> Result<VectorizerValue>
pub async fn replication_status(&self) -> Result<VectorizerValue>
replication.status — current replication role and replica list.
Sourcepub async fn replication_configure(
&self,
config: VectorizerValue,
) -> Result<ReplicationConfigureResult>
pub async fn replication_configure( &self, config: VectorizerValue, ) -> Result<ReplicationConfigureResult>
replication.configure — set the replication role for this node.
config must contain role (Str: "master" | "replica" |
"standalone") and optionally bind_address, master_address
(Str). A server restart is required for the change to take effect.
Sourcepub async fn replication_stats(&self) -> Result<VectorizerValue>
pub async fn replication_stats(&self) -> Result<VectorizerValue>
replication.stats — replication throughput and lag statistics.
Sourcepub async fn replication_replicas_list(&self) -> Result<VectorizerValue>
pub async fn replication_replicas_list(&self) -> Result<VectorizerValue>
replication.replicas_list — list connected replicas (master only).
Source§impl RpcClient
impl RpcClient
Sourcepub async fn cluster_failover(
&self,
replica_id: &str,
) -> Result<VectorizerValue>
pub async fn cluster_failover( &self, replica_id: &str, ) -> Result<VectorizerValue>
cluster.failover — promote a replica to master (admin).
Sourcepub async fn cluster_replica_resync(
&self,
replica_id: &str,
) -> Result<VectorizerValue>
pub async fn cluster_replica_resync( &self, replica_id: &str, ) -> Result<VectorizerValue>
cluster.replica_resync — force a replica to resync from master (admin).
Sourcepub async fn cluster_peer_add(
&self,
request: VectorizerValue,
) -> Result<VectorizerValue>
pub async fn cluster_peer_add( &self, request: VectorizerValue, ) -> Result<VectorizerValue>
cluster.peer_add — add a new peer to the cluster (admin).
request must contain address (Str) and optionally role
(Str: "member" | "observer").
Sourcepub async fn cluster_rebalance(&self) -> Result<VectorizerValue>
pub async fn cluster_rebalance(&self) -> Result<VectorizerValue>
cluster.rebalance — trigger a shard rebalance across peers (admin).
Sourcepub async fn cluster_rebalance_status(&self) -> Result<RebalanceStatus>
pub async fn cluster_rebalance_status(&self) -> Result<RebalanceStatus>
cluster.rebalance_status — check the status of an in-progress
rebalance (or confirm idle).