pub struct SpiffeWorkloadApiClient<T> { /* private fields */ }Implementations§
Source§impl<T> SpiffeWorkloadApiClient<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> SpiffeWorkloadApiClient<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,
) -> SpiffeWorkloadApiClient<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
Sourcepub async fn fetch_x509svid(
&mut self,
request: impl IntoRequest<X509svidRequest>,
) -> Result<Response<Streaming<X509svidResponse>>, Status>
pub async fn fetch_x509svid( &mut self, request: impl IntoRequest<X509svidRequest>, ) -> Result<Response<Streaming<X509svidResponse>>, Status>
Fetch X.509-SVIDs for all SPIFFE identities the workload is entitled to, as well as related information like trust bundles and CRLs. As this information changes, subsequent messages will be streamed from the server.
Sourcepub async fn fetch_x509_bundles(
&mut self,
request: impl IntoRequest<X509BundlesRequest>,
) -> Result<Response<Streaming<X509BundlesResponse>>, Status>
pub async fn fetch_x509_bundles( &mut self, request: impl IntoRequest<X509BundlesRequest>, ) -> Result<Response<Streaming<X509BundlesResponse>>, Status>
Fetch trust bundles and CRLs. Useful for clients that only need to validate SVIDs without obtaining an SVID for themself. As this information changes, subsequent messages will be streamed from the server.
Sourcepub async fn fetch_jwtsvid(
&mut self,
request: impl IntoRequest<JwtsvidRequest>,
) -> Result<Response<JwtsvidResponse>, Status>
pub async fn fetch_jwtsvid( &mut self, request: impl IntoRequest<JwtsvidRequest>, ) -> Result<Response<JwtsvidResponse>, Status>
Fetch JWT-SVIDs for all SPIFFE identities the workload is entitled to, for the requested audience. If an optional SPIFFE ID is requested, only the JWT-SVID for that SPIFFE ID is returned.
Sourcepub async fn fetch_jwt_bundles(
&mut self,
request: impl IntoRequest<JwtBundlesRequest>,
) -> Result<Response<Streaming<JwtBundlesResponse>>, Status>
pub async fn fetch_jwt_bundles( &mut self, request: impl IntoRequest<JwtBundlesRequest>, ) -> Result<Response<Streaming<JwtBundlesResponse>>, Status>
Fetches the JWT bundles, formatted as JWKS documents, keyed by the SPIFFE ID of the trust domain. As this information changes, subsequent messages will be streamed from the server.
Sourcepub async fn validate_jwtsvid(
&mut self,
request: impl IntoRequest<ValidateJwtsvidRequest>,
) -> Result<Response<ValidateJwtsvidResponse>, Status>
pub async fn validate_jwtsvid( &mut self, request: impl IntoRequest<ValidateJwtsvidRequest>, ) -> Result<Response<ValidateJwtsvidResponse>, Status>
Validates a JWT-SVID against the requested audience. Returns the SPIFFE ID of the JWT-SVID and JWT claims.
Trait Implementations§
Source§impl<T: Clone> Clone for SpiffeWorkloadApiClient<T>
impl<T: Clone> Clone for SpiffeWorkloadApiClient<T>
Source§fn clone(&self) -> SpiffeWorkloadApiClient<T>
fn clone(&self) -> SpiffeWorkloadApiClient<T>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl<T> !Freeze for SpiffeWorkloadApiClient<T>
impl<T> RefUnwindSafe for SpiffeWorkloadApiClient<T>where
T: RefUnwindSafe,
impl<T> Send for SpiffeWorkloadApiClient<T>where
T: Send,
impl<T> Sync for SpiffeWorkloadApiClient<T>where
T: Sync,
impl<T> Unpin for SpiffeWorkloadApiClient<T>where
T: Unpin,
impl<T> UnwindSafe for SpiffeWorkloadApiClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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