pub struct AwpEdge { /* private fields */ }Expand description
The AWP 2.0 agent edge of one site (spec 3.5 §7.9).
Cheap to clone; clones share the edge.
Implementations§
Source§impl AwpEdge
impl AwpEdge
Sourcepub fn builder(
registry: CapabilityRegistry,
keys: EdgeKeys,
public_url: Url,
) -> AwpEdgeBuilder
pub fn builder( registry: CapabilityRegistry, keys: EdgeKeys, public_url: Url, ) -> AwpEdgeBuilder
Starts a builder for the site whose capabilities registry holds, signing with keys,
served at public_url, the edge origin.
Sourcepub fn router(&self) -> Router
pub fn router(&self) -> Router
The edge’s routes, guarded; ServerBuilder::awp mounts them.
Sourcepub fn executor(&self) -> &GovernedExecutor
pub fn executor(&self) -> &GovernedExecutor
The governed executor every binding shares.
Sourcepub fn published_trust_rules(&self) -> &TrustRules
pub fn published_trust_rules(&self) -> &TrustRules
The trust rules published at GET /awp/v2/trust.
Sourcepub async fn set_mode(
&self,
mode: EdgeMode,
) -> Result<Option<SiteStatus>, StatusError>
pub async fn set_mode( &self, mode: EdgeMode, ) -> Result<Option<SiteStatus>, StatusError>
Switches the mode and publishes the signed status it implies (spec 3.5 §7.9, A-I11).
§Errors
StatusError when the status cannot be signed or stored; the mode still changes.
Sourcepub fn set_release_seq(&self, seq: u64)
pub fn set_release_seq(&self, seq: u64)
Records the release being served, named in the status the edge signs.
Sourcepub fn attach_governance(&self, control: GovernanceControl) -> bool
pub fn attach_governance(&self, control: GovernanceControl) -> bool
Attaches the owner’s kill switch unless one is attached; returns whether it was.
Sourcepub fn events(&self) -> &EdgeEvents
pub fn events(&self) -> &EdgeEvents
The event publisher: releases, catalogue changes and order updates (spec 3.5 §7.5).
Sourcepub fn beacon(&self) -> BeaconCounts
pub fn beacon(&self) -> BeaconCounts
The beacon’s daily counts, for the KPI tracker’s beacon source (spec 3.5 §7.12).
Sourcepub fn spawn_delivery_resumer(&self, interval: Duration) -> JoinHandle<()> ⓘ
pub fn spawn_delivery_resumer(&self, interval: Duration) -> JoinHandle<()> ⓘ
Resumes, every interval until the edge is dropped, the event deliveries a stopped
process left in a durable EventLog, so retries survive a restart (spec 3.5 §7.5);
see EdgeEvents::resume_deliveries. With a log that keeps no deliveries it finds
nothing.
Sourcepub fn status_control(&self) -> EdgeStatusControl
pub fn status_control(&self) -> EdgeStatusControl
A handle that switches the edge to read-only and back, for the back office’s incident path (spec 3.5 A-I11).
Sourcepub async fn resolve_held(
&self,
id: &str,
) -> Result<Option<HeldCall>, StoreError>
pub async fn resolve_held( &self, id: &str, ) -> Result<Option<HeldCall>, StoreError>
Resolves held call id if the owner decided it; see GovernedExecutor::resolve.
§Errors
StoreError when the held-call store fails.
Sourcepub fn spawn_resolver(&self, interval: Duration) -> JoinHandle<()> ⓘ
pub fn spawn_resolver(&self, interval: Duration) -> JoinHandle<()> ⓘ
Resolves pending held calls every interval until the edge is dropped, so decisions
take effect without a requester polling (spec 3.5 §7.4).
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for AwpEdge
impl !UnwindSafe for AwpEdge
impl Forget for AwpEdge
impl Freeze for AwpEdge
impl Move for AwpEdge
impl Send for AwpEdge
impl Sync for AwpEdge
impl Unpin for AwpEdge
impl UnsafeUnpin for AwpEdgewhere
*const ArcInner<EdgeInner> is !null: UnsafeUnpin,
PhantomData<ArcInner<EdgeInner>>: UnsafeUnpin,
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