pub struct MetadataServiceClient<T> { /* private fields */ }Implementations§
Source§impl<T> MetadataServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> MetadataServiceClient<T>where
T: GrpcService<BoxBody>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> MetadataServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<BoxBody>, Response = Response<<T as GrpcService<BoxBody>>::ResponseBody>>,
<T as Service<Request<BoxBody>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
Sourcepub async fn get_shards(
&mut self,
request: impl IntoRequest<GetShardsRequest>,
) -> Result<Response<GetShardsResponse>, Status>
pub async fn get_shards( &mut self, request: impl IntoRequest<GetShardsRequest>, ) -> Result<Response<GetShardsResponse>, Status>
List all known shards.
Sourcepub async fn get_column_families(
&mut self,
request: impl IntoRequest<GetColumnFamiliesRequest>,
) -> Result<Response<GetColumnFamiliesResponse>, Status>
pub async fn get_column_families( &mut self, request: impl IntoRequest<GetColumnFamiliesRequest>, ) -> Result<Response<GetColumnFamiliesResponse>, Status>
List all registered column families.
Sourcepub async fn propose_op(
&mut self,
request: impl IntoRequest<ProposeMetadataOpRequest>,
) -> Result<Response<ProposeMetadataOpResponse>, Status>
pub async fn propose_op( &mut self, request: impl IntoRequest<ProposeMetadataOpRequest>, ) -> Result<Response<ProposeMetadataOpResponse>, Status>
Propose a metadata change through the metadata Raft group.
Sourcepub async fn get_shard_for_key(
&mut self,
request: impl IntoRequest<GetShardForKeyRequest>,
) -> Result<Response<GetShardForKeyResponse>, Status>
pub async fn get_shard_for_key( &mut self, request: impl IntoRequest<GetShardForKeyRequest>, ) -> Result<Response<GetShardForKeyResponse>, Status>
Find the shard responsible for a (CF, key) pair.
Sourcepub async fn register_node(
&mut self,
request: impl IntoRequest<RegisterNodeRequest>,
) -> Result<Response<RegisterNodeResponse>, Status>
pub async fn register_node( &mut self, request: impl IntoRequest<RegisterNodeRequest>, ) -> Result<Response<RegisterNodeResponse>, Status>
Register a data node so the metadata service knows its addresses. Called by each data node on startup.
Sourcepub async fn subscribe_shard_events(
&mut self,
request: impl IntoRequest<SubscribeShardEventsRequest>,
) -> Result<Response<Streaming<ShardEventProto>>, Status>
pub async fn subscribe_shard_events( &mut self, request: impl IntoRequest<SubscribeShardEventsRequest>, ) -> Result<Response<Streaming<ShardEventProto>>, Status>
Subscribe to shard lifecycle events (server-streaming). The server first streams a full state snapshot (all current shards, nodes, and column families as synthetic events), then streams live updates as they are committed through the metadata Raft group.
Sourcepub async fn report_node_stats(
&mut self,
request: impl IntoRequest<ReportNodeStatsRequest>,
) -> Result<Response<ReportNodeStatsResponse>, Status>
pub async fn report_node_stats( &mut self, request: impl IntoRequest<ReportNodeStatsRequest>, ) -> Result<Response<ReportNodeStatsResponse>, Status>
Data nodes periodically report their per-shard/per-CF stats. Stats are cached in memory (not replicated via Raft).
Sourcepub async fn train_vector_index(
&mut self,
request: impl IntoRequest<TrainVectorIndexRequest>,
) -> Result<Response<TrainVectorIndexResponse>, Status>
pub async fn train_vector_index( &mut self, request: impl IntoRequest<TrainVectorIndexRequest>, ) -> Result<Response<TrainVectorIndexResponse>, Status>
Train a vector index (orchestrated by metadata service). For IVF-PQ/IVF-SQ: global centroid training + distribute to nodes. For SPFresh: local training on each node.
Sourcepub async fn train_coarse_routing(
&mut self,
request: impl IntoRequest<TrainCoarseRoutingRequest>,
) -> Result<Response<TrainCoarseRoutingResponse>, Status>
pub async fn train_coarse_routing( &mut self, request: impl IntoRequest<TrainCoarseRoutingRequest>, ) -> Result<Response<TrainCoarseRoutingResponse>, Status>
Train coarse routing centroids for SPFresh (two-level routing).
Trait Implementations§
Source§impl<T: Clone> Clone for MetadataServiceClient<T>
impl<T: Clone> Clone for MetadataServiceClient<T>
Source§fn clone(&self) -> MetadataServiceClient<T>
fn clone(&self) -> MetadataServiceClient<T>
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for MetadataServiceClient<T>
impl<T> RefUnwindSafe for MetadataServiceClient<T>where
T: RefUnwindSafe,
impl<T> Send for MetadataServiceClient<T>where
T: Send,
impl<T> Sync for MetadataServiceClient<T>where
T: Sync,
impl<T> Unpin for MetadataServiceClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for MetadataServiceClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for MetadataServiceClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request