pub struct Client { /* private fields */ }Expand description
A client for the SPIFFE Workload API.
This client can be used to fetch X.509 and JWT SVIDs and bundles from a Workload API endpoint.
Implementations§
Source§impl Client
impl Client
Sourcepub async fn fetch_x509_svid(&self, ctx: &Context) -> Result<SVID>
pub async fn fetch_x509_svid(&self, ctx: &Context) -> Result<SVID>
Fetches a single X.509 SVID from the Workload API.
Sourcepub async fn fetch_x509_svids(&self, ctx: &Context) -> Result<Vec<SVID>>
pub async fn fetch_x509_svids(&self, ctx: &Context) -> Result<Vec<SVID>>
Fetches all X.509 SVIDs from the Workload API.
Sourcepub async fn fetch_x509_bundles(&self, ctx: &Context) -> Result<Set>
pub async fn fetch_x509_bundles(&self, ctx: &Context) -> Result<Set>
Fetches X.509 bundles from the Workload API.
Sourcepub async fn watch_x509_bundles(
&self,
ctx: &Context,
watcher: Arc<dyn X509BundleWatcher>,
) -> Result<()>
pub async fn watch_x509_bundles( &self, ctx: &Context, watcher: Arc<dyn X509BundleWatcher>, ) -> Result<()>
Watches for X.509 bundle updates from the Workload API.
Sourcepub async fn fetch_x509_context(&self, ctx: &Context) -> Result<X509Context>
pub async fn fetch_x509_context(&self, ctx: &Context) -> Result<X509Context>
Fetches the X.509 context (SVIDs and bundles) from the Workload API.
Sourcepub async fn watch_x509_context(
&self,
ctx: &Context,
watcher: Arc<dyn X509ContextWatcher>,
) -> Result<()>
pub async fn watch_x509_context( &self, ctx: &Context, watcher: Arc<dyn X509ContextWatcher>, ) -> Result<()>
Watches for X.509 context updates from the Workload API.
Sourcepub async fn fetch_jwt_svid(
&self,
ctx: &Context,
params: Params,
) -> Result<SVID>
pub async fn fetch_jwt_svid( &self, ctx: &Context, params: Params, ) -> Result<SVID>
Fetches a single JWT SVID from the Workload API.
Sourcepub async fn fetch_jwt_svids(
&self,
ctx: &Context,
params: Params,
) -> Result<Vec<SVID>>
pub async fn fetch_jwt_svids( &self, ctx: &Context, params: Params, ) -> Result<Vec<SVID>>
Fetches multiple JWT SVIDs from the Workload API.
Sourcepub async fn fetch_jwt_bundles(&self, ctx: &Context) -> Result<Set>
pub async fn fetch_jwt_bundles(&self, ctx: &Context) -> Result<Set>
Fetches JWT bundles from the Workload API.
Sourcepub async fn watch_jwt_bundles(
&self,
ctx: &Context,
watcher: Arc<dyn JWTBundleWatcher>,
) -> Result<()>
pub async fn watch_jwt_bundles( &self, ctx: &Context, watcher: Arc<dyn JWTBundleWatcher>, ) -> Result<()>
Watches for JWT bundle updates from the Workload API.
Auto Trait Implementations§
impl !Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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
Mutably borrows from an owned value. Read more
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>
Wrap the input message
T in a tonic::Request