pub struct GovernedExecutor { /* private fields */ }Expand description
The governed CapabilityExecutor of the edge (spec 3.5 §7.4).
Build it through AwpEdge; every binding shares one.
Implementations§
Source§impl GovernedExecutor
impl GovernedExecutor
Sourcepub fn registry(&self) -> &Arc<CapabilityRegistry> ⓘ
pub fn registry(&self) -> &Arc<CapabilityRegistry> ⓘ
The capability registry.
Sourcepub async fn invoke_as(
&self,
caller: &EdgeCaller,
invocation: Invocation,
) -> InvocationOutcome
pub async fn invoke_as( &self, caller: &EdgeCaller, invocation: Invocation, ) -> InvocationOutcome
Executes, holds or refuses invocation for caller (spec 3.5 §7.4).
Sourcepub async fn resolve(&self, id: &str) -> Result<Option<HeldCall>, StoreError>
pub async fn resolve(&self, id: &str) -> Result<Option<HeldCall>, StoreError>
Resolves held call id once the owner decided it (spec 3.5 §7.4): an approved call runs
through the governed path again and completes with its output or error; a refused call
ends rejected, or expired when its approval request expired; a call past its
expiresAt expires. A call with no decision, or one decided while the kill switch is
engaged, stays pending. Returns the held call, or None for an unknown id.
§Errors
StoreError when the held-call store fails.
Sourcepub async fn resolve_pending(&self) -> Result<Vec<HeldCall>, StoreError>
pub async fn resolve_pending(&self) -> Result<Vec<HeldCall>, StoreError>
Resolves every pending held call that has a decision or is past its expiry; returns
the calls that left pending.
§Errors
StoreError when the held-call store fails.
Trait Implementations§
Source§impl CapabilityExecutor for GovernedExecutor
impl CapabilityExecutor for GovernedExecutor
Source§fn invoke<'life0, 'async_trait>(
&'life0 self,
invocation: Invocation,
) -> Pin<Box<dyn Future<Output = InvocationOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn invoke<'life0, 'async_trait>(
&'life0 self,
invocation: Invocation,
) -> Pin<Box<dyn Future<Output = InvocationOutcome> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Runs invocation for the caller of the request being served.
Source§impl Clone for GovernedExecutor
impl Clone for GovernedExecutor
Auto Trait Implementations§
impl !RefUnwindSafe for GovernedExecutor
impl !UnwindSafe for GovernedExecutor
impl Forget for GovernedExecutor
impl Freeze for GovernedExecutor
impl Move for GovernedExecutor
impl Send for GovernedExecutor
impl Sync for GovernedExecutor
impl Unpin for GovernedExecutor
impl UnsafeUnpin for GovernedExecutor
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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