pub struct ObjectStoreDirectoryService {
instance_name: String,
object_store: Arc<dyn ObjectStore>,
base_path: Path,
}Expand description
Stores directory closures in an object store.
Notably, this makes use of the option to disallow accessing child directories except when
fetching them recursively via the top-level directory, since all batched writes
(using put_multiple_start) are stored in a single object.
Directories are stored in a length-delimited format with a 1MiB limit. The length field is a
u32 and the directories are stored in root-to-leaves topological order, the same way they will
be returned to the client in get_recursive.
Fields§
§instance_name: String§object_store: Arc<dyn ObjectStore>§base_path: PathImplementations§
Trait Implementations§
Source§impl Clone for ObjectStoreDirectoryService
impl Clone for ObjectStoreDirectoryService
Source§fn clone(&self) -> ObjectStoreDirectoryService
fn clone(&self) -> ObjectStoreDirectoryService
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl DirectoryService for ObjectStoreDirectoryService
impl DirectoryService for ObjectStoreDirectoryService
Source§fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
digest: &'life1 B3Digest,
) -> Pin<Box<dyn Future<Output = Result<Option<Directory>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
digest: &'life1 B3Digest,
) -> Pin<Box<dyn Future<Output = Result<Option<Directory>, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
This is the same steps as for get_recursive anyways, so we just call get_recursive and return the first element of the stream and drop the request.
Source§fn put<'life0, 'async_trait>(
&'life0 self,
directory: Directory,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn put<'life0, 'async_trait>(
&'life0 self,
directory: Directory,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn get_recursive(
&self,
root_directory_digest: &B3Digest,
) -> BoxStream<'_, Result<Directory, Error>>
fn get_recursive( &self, root_directory_digest: &B3Digest, ) -> BoxStream<'_, Result<Directory, Error>>
Source§fn put_multiple_start(&self) -> Box<dyn DirectoryPutter + '_>where
Self: Clone,
fn put_multiple_start(&self) -> Box<dyn DirectoryPutter + '_>where
Self: Clone,
Auto Trait Implementations§
impl Freeze for ObjectStoreDirectoryService
impl !RefUnwindSafe for ObjectStoreDirectoryService
impl Send for ObjectStoreDirectoryService
impl Sync for ObjectStoreDirectoryService
impl Unpin for ObjectStoreDirectoryService
impl UnsafeUnpin for ObjectStoreDirectoryService
impl !UnwindSafe for ObjectStoreDirectoryService
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DirectoryServiceGraphExt for Twhere
T: DirectoryService,
impl<T> DirectoryServiceGraphExt for Twhere
T: DirectoryService,
Source§fn get_directory_graph<'life0, 'life1, 'async_trait>(
&'life0 self,
digest: &'life1 B3Digest,
) -> Pin<Box<dyn Future<Output = Result<Option<DirectoryGraph>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
fn get_directory_graph<'life0, 'life1, 'async_trait>(
&'life0 self,
digest: &'life1 B3Digest,
) -> Pin<Box<dyn Future<Output = Result<Option<DirectoryGraph>, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait,
Queries the DirectoryService for the directory graph with the given root digest.
Source§fn put_directory_graph<'life0, 'async_trait>(
&'life0 self,
directory_graph: DirectoryGraph,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
fn put_directory_graph<'life0, 'async_trait>(
&'life0 self,
directory_graph: DirectoryGraph,
) -> Pin<Box<dyn Future<Output = Result<B3Digest, Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
T: 'async_trait,
Inserts the given DirectoryGraph into the service.
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].