pub struct RemoteInspector<C> { /* private fields */ }Expand description
One named synchronous inspector over a shared hook client.
Implementations§
Source§impl<C> RemoteInspector<C>
impl<C> RemoteInspector<C>
Sourcepub fn new(name: impl Into<String>, client: Arc<HookClient<C>>) -> Self
pub fn new(name: impl Into<String>, client: Arc<HookClient<C>>) -> Self
The inspector’s configuration identity, with the default 5 s timeout.
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Bound each remote attempt by this timeout.
Source§impl<C: HookChannel> RemoteInspector<C>
impl<C: HookChannel> RemoteInspector<C>
Sourcepub async fn inspect(
&self,
op: &Operation,
inspection_id: &str,
objects: &[InspectObject],
) -> Result<InspectVerdict, ServerError>
pub async fn inspect( &self, op: &Operation, inspection_id: &str, objects: &[InspectObject], ) -> Result<InspectVerdict, ServerError>
Inspect one complete assigned batch before apply. Every attempt signs
afresh; the caller retains inspection_id across logical retries.
§Errors
Retryable unavailable for transport failures or invalid metadata/verdicts.
Trait Implementations§
Source§impl<C> Clone for RemoteInspector<C>
impl<C> Clone for RemoteInspector<C>
Source§impl<C: HookChannel> ContentInspector for RemoteInspector<C>
impl<C: HookChannel> ContentInspector for RemoteInspector<C>
Source§fn retrieval_timeout(&self) -> Duration
fn retrieval_timeout(&self) -> Duration
Bound capability validity to this inspector’s actual hook timeout.
Source§fn inspect_with_retrieval<'a>(
&'a self,
op: &'a Operation,
id: &'a str,
objects: &'a [InspectObject],
retrieval: Option<InspectRetrieval>,
) -> BoxFuture<'a, Result<InspectVerdict, ServerError>>
fn inspect_with_retrieval<'a>( &'a self, op: &'a Operation, id: &'a str, objects: &'a [InspectObject], retrieval: Option<InspectRetrieval>, ) -> BoxFuture<'a, Result<InspectVerdict, ServerError>>
Inspect with optional private retrieval metadata. In-process inspectors
can use this seam without sending object bytes in the metadata request.
Source§fn inspect<'a>(
&'a self,
op: &'a Operation,
inspection_id: &'a str,
objects: &'a [InspectObject],
) -> BoxFuture<'a, Result<InspectVerdict, ServerError>>
fn inspect<'a>( &'a self, op: &'a Operation, inspection_id: &'a str, objects: &'a [InspectObject], ) -> BoxFuture<'a, Result<InspectVerdict, ServerError>>
Inspect exactly this assigned batch; the logical id survives retries.
Source§fn phase(&self) -> InspectorPhase
fn phase(&self) -> InspectorPhase
Launch supports synchronous checks only.
Launch supports fail-closed availability only.
Auto Trait Implementations§
impl<C> !RefUnwindSafe for RemoteInspector<C>
impl<C> !UnwindSafe for RemoteInspector<C>
impl<C> Freeze for RemoteInspector<C>
impl<C> Send for RemoteInspector<C>
impl<C> Sync for RemoteInspector<C>
impl<C> Unpin for RemoteInspector<C>
impl<C> UnsafeUnpin for RemoteInspector<C>
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
Mutably borrows from an owned value. Read more