pub struct RtkShellAdapter { /* private fields */ }Expand description
External shell optimizer kept outside the production adapter registry.
Implementations§
Source§impl RtkShellAdapter
impl RtkShellAdapter
Sourcepub fn new(config: RtkConfig) -> Self
pub fn new(config: RtkConfig) -> Self
Construct a reference adapter. Missing pins make health false closed.
Sourcepub fn with_kill_switch(config: RtkConfig, kill_switch: Arc<KillSwitch>) -> Self
pub fn with_kill_switch(config: RtkConfig, kill_switch: Arc<KillSwitch>) -> Self
Construct an adapter with a shared atomic kill switch.
Sourcepub fn kill_switch(&self) -> &Arc<KillSwitch> ⓘ
pub fn kill_switch(&self) -> &Arc<KillSwitch> ⓘ
Read-only kill-switch access for orchestration.
Sourcepub fn last_failure(&self) -> Option<CapabilityFailure>
pub fn last_failure(&self) -> Option<CapabilityFailure>
Return the most recent evidenced external failure.
Sourcepub fn health_check_detailed(&self) -> RtkHealthReport
pub fn health_check_detailed(&self) -> RtkHealthReport
Perform binary existence, exact version, and exact hash checks.
Sourcepub fn health_check(&self) -> RtkHealthReport
pub fn health_check(&self) -> RtkHealthReport
Check health without invoking anything when the kill switch is active.
Sourcepub fn observe_rtk(
&self,
invocation: &CapabilityInvocation,
) -> Result<CapabilityResult, CapabilityFailure>
pub fn observe_rtk( &self, invocation: &CapabilityInvocation, ) -> Result<CapabilityResult, CapabilityFailure>
Execute RTK only, returning a detailed failure instead of falling back. This is the method used by shadow mode.
Sourcepub fn observe_native(
&self,
invocation: &CapabilityInvocation,
) -> OclaResult<CapabilityResult>
pub fn observe_native( &self, invocation: &CapabilityInvocation, ) -> OclaResult<CapabilityResult>
Execute the native command only and return its observation.
Sourcepub fn invoke_with_fallback(
&self,
invocation: &CapabilityInvocation,
) -> OclaResult<CapabilityResult>
pub fn invoke_with_fallback( &self, invocation: &CapabilityInvocation, ) -> OclaResult<CapabilityResult>
Invoke the reference adapter and fall back to the original native command on every evidenced external failure.
Trait Implementations§
Source§impl CapabilityAdapter for RtkShellAdapter
impl CapabilityAdapter for RtkShellAdapter
fn manifest(&self) -> &CapabilityManifestV1
fn invoke( &self, invocation: CapabilityInvocation, ) -> OclaResult<CapabilityResult>
fn health_check(&self) -> OclaResult<bool>
Auto Trait Implementations§
impl !Freeze for RtkShellAdapter
impl RefUnwindSafe for RtkShellAdapter
impl Send for RtkShellAdapter
impl Sync for RtkShellAdapter
impl Unpin for RtkShellAdapter
impl UnsafeUnpin for RtkShellAdapter
impl UnwindSafe for RtkShellAdapter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
Converts
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> ⓘ
Converts
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