@@ -23,10 +23,10 @@ use proto::{
2323 AddPathRequest , AddPathResponse , AddStreamRequest , AddStreamResponse , AddStreamUpdate ,
2424 BatchAddPathRequest , BatchAddPathResponse , BatchAddStreamRequest , BatchAddStreamResponse ,
2525 BatchAddStreamUpdate , BatchCreateRequest , BatchCreateResponse , BatchCreateTempTagRequest ,
26- BatchUpdate , BlobStatusRequest , BlobStatusResponse , ConsistencyCheckRequest ,
27- CreateCollectionRequest , CreateCollectionResponse , DeleteRequest , DownloadResponse ,
28- ExportRequest , ExportResponse , ListIncompleteRequest , ListRequest , ReadAtRequest ,
29- ReadAtResponse , ValidateRequest ,
26+ BatchUpdate , BlobEntryInfoRequest , BlobStatusRequest , BlobStatusResponse ,
27+ ConsistencyCheckRequest , CreateCollectionRequest , CreateCollectionResponse , DeleteRequest ,
28+ DownloadResponse , ExportRequest , ExportResponse , ListIncompleteRequest , ListRequest ,
29+ ReadAtRequest , ReadAtResponse , ValidateRequest ,
3030 } ,
3131 tags:: {
3232 CreateRequest as TagsCreateRequest , DeleteRequest as TagDeleteRequest ,
@@ -51,7 +51,9 @@ use crate::{
5151 } ,
5252 net_protocol:: { BlobDownloadRequest , Blobs , BlobsInner } ,
5353 provider:: { AddProgress , BatchAddPathProgress } ,
54- store:: { ConsistencyCheckProgress , ImportProgress , MapEntry , ValidateProgress } ,
54+ store:: {
55+ ConsistencyCheckProgress , EntryPathOrData , ImportProgress , MapEntry , ValidateProgress ,
56+ } ,
5557 util:: {
5658 local_pool:: LocalPoolHandle ,
5759 progress:: { AsyncChannelProgressSender , ProgressSender } ,
@@ -203,6 +205,7 @@ impl<D: crate::store::Store> Handler<D> {
203205 . await
204206 }
205207 BatchCreateTempTag ( msg) => chan. rpc ( msg, self , Self :: batch_create_temp_tag) . await ,
208+ EntryInfo ( msg) => chan. rpc ( msg, self , Self :: blob_entry_info) . await ,
206209 }
207210 }
208211
@@ -309,6 +312,17 @@ impl<D: crate::store::Store> Handler<D> {
309312 Ok ( ( ) )
310313 }
311314
315+ async fn blob_entry_info (
316+ self ,
317+ msg : BlobEntryInfoRequest ,
318+ ) -> RpcResult < Option < EntryPathOrData > > {
319+ Ok ( self
320+ . store ( )
321+ . entry_path_or_data ( msg. hash )
322+ . await
323+ . map_err ( |e| RpcError :: new ( & e) ) ?)
324+ }
325+
312326 fn blob_list_tags ( self , msg : TagListRequest ) -> impl Stream < Item = TagInfo > + Send + ' static {
313327 tracing:: info!( "blob_list_tags" ) ;
314328 let blobs = self ;
0 commit comments