pub trait Scanner:
Send
+ Sync
+ 'static {
type ScanStream: Stream<Item = Result<ScanResponse, Status>> + Send + 'static;
// Required methods
fn get_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<InfoReply>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn clear_results<'life0, 'async_trait>(
&'life0 self,
request: Request<ClearResultsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn delete_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteKeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_results<'life0, 'async_trait>(
&'life0 self,
request: Request<GetResultsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetResultsResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn register_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterKeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterKeysResponse>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn scan<'life0, 'async_trait>(
&'life0 self,
request: Request<ScanRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Self::ScanStream>, Status>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}
Expand description
Generated trait containing gRPC methods that should be implemented for use with ScannerServer.
Required Associated Types§
Sourcetype ScanStream: Stream<Item = Result<ScanResponse, Status>> + Send + 'static
type ScanStream: Stream<Item = Result<ScanResponse, Status>> + Send + 'static
Server streaming response type for the Scan method.
Required Methods§
Sourcefn get_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<InfoReply>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_info<'life0, 'async_trait>(
&'life0 self,
request: Request<Empty>,
) -> Pin<Box<dyn Future<Output = Result<Response<InfoReply>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get information about the scanner service.
Sourcefn clear_results<'life0, 'async_trait>(
&'life0 self,
request: Request<ClearResultsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn clear_results<'life0, 'async_trait>(
&'life0 self,
request: Request<ClearResultsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Clear results for a set of keys without removing the keys from the scanner. This request does not stop the scanner from scanning blocks for these keys, it only clears past results.
Sourcefn delete_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteKeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn delete_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<DeleteKeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<Empty>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Deletes a set of keys and their results from the scanner. This request stop the scanner from scanning blocks for the these keys.
Sourcefn get_results<'life0, 'async_trait>(
&'life0 self,
request: Request<GetResultsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetResultsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_results<'life0, 'async_trait>(
&'life0 self,
request: Request<GetResultsRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GetResultsResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get all data we have stored for the given keys.
Sourcefn register_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterKeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterKeysResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn register_keys<'life0, 'async_trait>(
&'life0 self,
request: Request<RegisterKeysRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RegisterKeysResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Submits scanning keys to the scanner.