pub struct CustomDiscoveryService { /* private fields */ }Expand description
Implementação personalizada do Discovery service
Implementations§
Source§impl CustomDiscoveryService
impl CustomDiscoveryService
Sourcepub async fn new(
config: AdvancedDiscoveryConfig,
client_config: ClientConfig,
) -> Result<Self>
pub async fn new( config: AdvancedDiscoveryConfig, client_config: ClientConfig, ) -> Result<Self>
Cria nova instância do CustomDiscoveryService
Sourcepub async fn discover_with_methods(
&mut self,
node_id: NodeId,
methods: Vec<DiscoveryMethod>,
) -> Result<Vec<NodeAddr>>
pub async fn discover_with_methods( &mut self, node_id: NodeId, methods: Vec<DiscoveryMethod>, ) -> Result<Vec<NodeAddr>>
Executa discovery usando múltiplos métodos
Sourcepub async fn get_discovery_cache_stats(&self) -> DiscoveryCacheStats
pub async fn get_discovery_cache_stats(&self) -> DiscoveryCacheStats
Obtém estatísticas detalhadas do cache LRU discovery
Source§impl CustomDiscoveryService
impl CustomDiscoveryService
Sourcepub async fn custom_discover(
&mut self,
node_id: &NodeId,
) -> Result<Vec<NodeAddr>, Box<dyn Error + Send + Sync>>
pub async fn custom_discover( &mut self, node_id: &NodeId, ) -> Result<Vec<NodeAddr>, Box<dyn Error + Send + Sync>>
Método personalizado para discovery integrado com DHT
Sourcepub async fn query_iroh_endpoint_for_peer(
&mut self,
node_id: NodeId,
) -> Result<Vec<NodeAddr>, Box<dyn Error + Send + Sync>>
pub async fn query_iroh_endpoint_for_peer( &mut self, node_id: NodeId, ) -> Result<Vec<NodeAddr>, Box<dyn Error + Send + Sync>>
Consulta DHT usando endpoint do Iroh
Sourcepub async fn integrate_with_active_discoveries(
&mut self,
active_discoveries: &Arc<RwLock<HashMap<NodeId, DiscoverySession>>>,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn integrate_with_active_discoveries( &mut self, active_discoveries: &Arc<RwLock<HashMap<NodeId, DiscoverySession>>>, ) -> Result<(), Box<dyn Error + Send + Sync>>
Integra descoberta DHT com sistema de sessões ativas
Sourcepub async fn auto_publish_on_discovery(
&self,
node_data: &NodeData,
config: &ClientConfig,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn auto_publish_on_discovery( &self, node_data: &NodeData, config: &ClientConfig, ) -> Result<(), Box<dyn Error + Send + Sync>>
Publica automaticamente quando novos peers são descobertos
Trait Implementations§
Source§impl Debug for CustomDiscoveryService
impl Debug for CustomDiscoveryService
Auto Trait Implementations§
impl Freeze for CustomDiscoveryService
impl RefUnwindSafe for CustomDiscoveryService
impl Send for CustomDiscoveryService
impl Sync for CustomDiscoveryService
impl Unpin for CustomDiscoveryService
impl UnwindSafe for CustomDiscoveryService
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> 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> IntoDiscovery for Twhere
T: Discovery,
impl<T> IntoDiscovery for Twhere
T: Discovery,
Source§fn into_discovery(
self,
_context: &DiscoveryContext<'_>,
) -> Result<impl Discovery, IntoDiscoveryError>
fn into_discovery( self, _context: &DiscoveryContext<'_>, ) -> Result<impl Discovery, IntoDiscoveryError>
Turns this discovery builder into a ready-to-use discovery service. Read more
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