Trait Cluster
pub trait Cluster:
Send
+ Sync
+ 'static {
// Required methods
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn range<'life0, 'async_trait>(
&'life0 self,
request: Request<RangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RangeResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
fn metasrv_peers<'life0, 'async_trait>(
&'life0 self,
request: Request<MetasrvPeersRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MetasrvPeersResponse>, Status>> + Send + 'async_trait>>
where 'life0: 'async_trait,
Self: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with ClusterServer.
Required Methods§
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn batch_get<'life0, 'async_trait>(
&'life0 self,
request: Request<BatchGetRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<BatchGetResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Batch get kvs by input keys from leader’s in_memory kv store.
fn range<'life0, 'async_trait>(
&'life0 self,
request: Request<RangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RangeResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn range<'life0, 'async_trait>(
&'life0 self,
request: Request<RangeRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RangeResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Range get the kvs from leader’s in_memory kv store.
fn metasrv_peers<'life0, 'async_trait>(
&'life0 self,
request: Request<MetasrvPeersRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MetasrvPeersResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
fn metasrv_peers<'life0, 'async_trait>(
&'life0 self,
request: Request<MetasrvPeersRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<MetasrvPeersResponse>, Status>> + Send + 'async_trait>>where
'life0: 'async_trait,
Self: 'async_trait,
Returns all the peers of metasrv.