pub struct BigtableDirectoryService {
instance_name: String,
client: BigTable,
params: BigtableParameters,
}cloud only.Expand description
Provides a DirectoryService implementation using Bigtable as an underlying K/V store.
§Data format
We use Bigtable as a plain K/V store. The row key is the digest of the directory, in hexlower. Inside the row, we currently have a single column/cell, again using the hexlower directory digest. Its value is the Directory message, serialized in canonical protobuf. We currently only populate this column.
In the future, we might want to introduce “bucketing”, essentially storing
all directories inserted via put_multiple_start in a batched form.
This will prevent looking up intermediate Directories, which are not
directly at the root, so rely on store composition.
Fields§
§instance_name: String§client: BigTable§params: BigtableParametersImplementations§
Trait Implementations§
Source§impl Clone for BigtableDirectoryService
impl Clone for BigtableDirectoryService
Source§fn clone(&self) -> BigtableDirectoryService
fn clone(&self) -> BigtableDirectoryService
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 BigtableDirectoryService
impl DirectoryService for BigtableDirectoryService
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,
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<'static, Result<Directory, Error>>
fn get_recursive( &self, root_directory_digest: &B3Digest, ) -> BoxStream<'static, Result<Directory, Error>>
Source§fn put_multiple_start(&self) -> Box<dyn DirectoryPutter + '_>
fn put_multiple_start(&self) -> Box<dyn DirectoryPutter + '_>
Auto Trait Implementations§
impl !Freeze for BigtableDirectoryService
impl !RefUnwindSafe for BigtableDirectoryService
impl Send for BigtableDirectoryService
impl Sync for BigtableDirectoryService
impl Unpin for BigtableDirectoryService
impl UnsafeUnpin for BigtableDirectoryService
impl !UnwindSafe for BigtableDirectoryService
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].