pub struct McpEndpoint { /* private fields */ }Expand description
The endpoint: the sessions it holds and the surface they share.
Implementations§
Source§impl McpEndpoint
impl McpEndpoint
Sourcepub fn new(live: impl IntoLive, version: &'static str, url: String) -> Self
pub fn new(live: impl IntoLive, version: &'static str, url: String) -> Self
An endpoint over a context, announcing version, reachable at url.
Sourcepub fn reap(&self) -> Vec<PeerId>
pub fn reap(&self) -> Vec<PeerId>
Forget every session silent longer than SESSION_IDLE_TIMEOUT, and close every
episode detached longer than crate::episodes::REATTACH_GRACE; the peers it
returns are gone.
Sourcepub fn reap_idle(
&self,
timeout: Duration,
episode_grace: Duration,
) -> Vec<PeerId>
pub fn reap_idle( &self, timeout: Duration, episode_grace: Duration, ) -> Vec<PeerId>
The same, with both bounds given.
Two parameters and not one, because there are two clocks and a suite that could only
move the first could never see the second fire. The episode grace is fifteen minutes
and no test may wait it out, so a reaper wired to a constant would be a reaper
nothing proves — the shape this repository keeps calling a half-verdict. Production
passes the constants; tests/shared_units.rs passes zero and watches an episode close.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for McpEndpoint
impl !RefUnwindSafe for McpEndpoint
impl !UnwindSafe for McpEndpoint
impl Send for McpEndpoint
impl Sync for McpEndpoint
impl Unpin for McpEndpoint
impl UnsafeUnpin for McpEndpoint
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