pub struct InferHub { /* private fields */ }Expand description
Adverts, forwarded requests and their responses between peers.
Implementations§
Source§impl InferHub
impl InferHub
Sourcepub fn new(
rt: Arc<MeshRuntime>,
upstream: Arc<Upstream>,
gate: Arc<ServeGate>,
audit: Option<Arc<dyn ProxyAudit>>,
) -> Arc<Self> ⓘ
pub fn new( rt: Arc<MeshRuntime>, upstream: Arc<Upstream>, gate: Arc<ServeGate>, audit: Option<Arc<dyn ProxyAudit>>, ) -> Arc<Self> ⓘ
Sourcepub fn attach(&self, table: Arc<PlacementTable>)
pub fn attach(&self, table: Arc<PlacementTable>)
The placement table this hub serves and feeds.
Sourcepub fn install(self: &Arc<Self>)
pub fn install(self: &Arc<Self>)
Register as the runtime’s control sink for INFER_TOPIC, and
forget a peer’s standing when it leaves.
Sourcepub fn set_max_pending(&self, n: usize)
pub fn set_max_pending(&self, n: usize)
Cap on exchanges in flight (default 256).
Sourcepub async fn announce(&self, now_secs: u64)
pub async fn announce(&self, now_secs: u64)
Send this node’s adverts for every exposed role to each connected peer that is allowed to use it and qualifies. Called periodically; receivers expire adverts they stop hearing.
Sourcepub fn qualifying_peers(&self) -> Vec<String>
pub fn qualifying_peers(&self) -> Vec<String>
Peers this node currently holds a qualifying grant for.
Trait Implementations§
Source§impl MeshDialer for InferHub
impl MeshDialer for InferHub
Source§fn standing(&self, node_id: &str) -> Option<Grant>
fn standing(&self, node_id: &str) -> Option<Grant>
The admission grant of the connected peer
node_id, if any.Source§fn dial<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MeshStream>, ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn dial<'life0, 'life1, 'async_trait>(
&'life0 self,
node_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Box<dyn MeshStream>, ProxyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
An authenticated stream to the peer.
Source§fn is_admitted(&self, node_id: &str) -> bool
fn is_admitted(&self, node_id: &str) -> bool
Whether
node_id is an enforced-admission full node with a trusted
scope right now.Auto Trait Implementations§
impl !Freeze for InferHub
impl !RefUnwindSafe for InferHub
impl !UnwindSafe for InferHub
impl Send for InferHub
impl Sync for InferHub
impl Unpin for InferHub
impl UnsafeUnpin for InferHub
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
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