pub struct DataServiceClient<T> { /* private fields */ }Expand description
Files of a domain, kept by the kernel under (tenant, domain, key), apart from the event log:
they are neither signed into it nor erased with the vault. Every request is signed by a key
granted data_read (get) or data_write (put, delete) for the domain, over
kernable.v1.data.<op>, and valid 60 s around issued_at. A put replaces the file under its
key. A put or delete runs at most once: the same signed request again is a replay, also after
it failed (it may have taken effect); send it signed anew. Errors:
UNAUTHENTICATED (invalid signature, outside the time window), PERMISSION_DENIED,
INVALID_ARGUMENT (domain, key or size), ALREADY_EXISTS (a replay), FAILED_PRECONDITION (a
put or delete signed before the kernel started: sign it again).
Implementations§
Source§impl<T> DataServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> DataServiceClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
pub fn new(inner: T) -> Self
pub fn with_origin(inner: T, origin: Uri) -> Self
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> DataServiceClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
Sourcepub fn send_compressed(self, encoding: CompressionEncoding) -> Self
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
Sourcepub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
Sourcepub fn max_decoding_message_size(self, limit: usize) -> Self
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
Sourcepub fn max_encoding_message_size(self, limit: usize) -> Self
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
pub async fn put_data( &mut self, request: impl IntoRequest<DataRequest>, ) -> Result<Response<DataResult>, Status>
pub async fn get_data( &mut self, request: impl IntoRequest<DataRequest>, ) -> Result<Response<DataResult>, Status>
pub async fn delete_data( &mut self, request: impl IntoRequest<DataRequest>, ) -> Result<Response<DataResult>, Status>
Sourcepub async fn list_data(
&mut self,
request: impl IntoRequest<DataRequest>,
) -> Result<Response<DataList>, Status>
pub async fn list_data( &mut self, request: impl IntoRequest<DataRequest>, ) -> Result<Response<DataList>, Status>
The files whose keys start with key (a prefix, may be empty), up to 1,000 per page, in
the order of their keys’ bytes, after after; granted data_read, checked as
<domain>.ListData. To find files no event names, or what a tenant stores.
Trait Implementations§
Source§impl<T: Clone> Clone for DataServiceClient<T>
impl<T: Clone> Clone for DataServiceClient<T>
Auto Trait Implementations§
impl<T> !Freeze for DataServiceClient<T>
impl<T> Forget for DataServiceClient<T>
impl<T> Move for DataServiceClient<T>
impl<T> RefUnwindSafe for DataServiceClient<T>where
Grpc<T>: RefUnwindSafe,
impl<T> Send for DataServiceClient<T>
impl<T> Sync for DataServiceClient<T>
impl<T> Unpin for DataServiceClient<T>
impl<T> UnsafeUnpin for DataServiceClient<T>where
Grpc<T>: UnsafeUnpin,
impl<T> UnwindSafe for DataServiceClient<T>where
Grpc<T>: UnwindSafe,
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> 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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request