pub struct DiscoveryConfig { /* private fields */ }Expand description
Configuration for the service discovery system
Implementations§
Source§impl DiscoveryConfig
impl DiscoveryConfig
Sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Set timeout for operations
Sourcepub fn with_service_type(self, service_type: ServiceType) -> Self
pub fn with_service_type(self, service_type: ServiceType) -> Self
Set service types to discover
Sourcepub fn service_types(&self) -> &[ServiceType]
pub fn service_types(&self) -> &[ServiceType]
Get service types
Sourcepub fn with_verify_services(self, verify: bool) -> Self
pub fn with_verify_services(self, verify: bool) -> Self
Set service verification flag
Sourcepub fn verify_services(&self) -> bool
pub fn verify_services(&self) -> bool
Check if service verification is enabled
Sourcepub fn with_interfaces(self, interfaces: HashSet<String>) -> Self
pub fn with_interfaces(self, interfaces: HashSet<String>) -> Self
Set network interfaces
Sourcepub fn interfaces(&self) -> Option<&HashSet<String>>
pub fn interfaces(&self) -> Option<&HashSet<String>>
Get network interfaces
Sourcepub fn with_max_services(self, max: usize) -> Self
pub fn with_max_services(self, max: usize) -> Self
Set maximum number of services
Sourcepub fn max_services(&self) -> usize
pub fn max_services(&self) -> usize
Get maximum number of services
Sourcepub fn with_max_retries(self, retries: u32) -> Self
pub fn with_max_retries(self, retries: u32) -> Self
Set maximum number of retries
Sourcepub fn max_retries(&self) -> u32
pub fn max_retries(&self) -> u32
Get maximum number of retries
Sourcepub fn enable_ipv4(&self) -> bool
pub fn enable_ipv4(&self) -> bool
Get IPv4 support status
Sourcepub fn enable_ipv6(&self) -> bool
pub fn enable_ipv6(&self) -> bool
Get IPv6 support status
Sourcepub fn with_protocol(self, protocol: ProtocolType) -> Self
pub fn with_protocol(self, protocol: ProtocolType) -> Self
Enable a protocol
Sourcepub fn is_protocol_enabled(&self, protocol: ProtocolType) -> bool
pub fn is_protocol_enabled(&self, protocol: ProtocolType) -> bool
Check if a protocol is enabled
Sourcepub fn enable_protocol(&mut self, protocol: ProtocolType)
pub fn enable_protocol(&mut self, protocol: ProtocolType)
Enable a protocol
Sourcepub fn disable_protocol(&mut self, protocol: ProtocolType)
pub fn disable_protocol(&mut self, protocol: ProtocolType)
Disable a protocol
Sourcepub fn with_protocols(self, protocols: HashSet<ProtocolType>) -> Self
pub fn with_protocols(self, protocols: HashSet<ProtocolType>) -> Self
Set enabled protocols
Sourcepub fn protocols(&self) -> &HashSet<ProtocolType>
pub fn protocols(&self) -> &HashSet<ProtocolType>
Get enabled protocols
Sourcepub fn with_cross_protocol(self, enable: bool) -> Self
pub fn with_cross_protocol(self, enable: bool) -> Self
Enable cross-protocol discovery
Sourcepub fn allow_cross_protocol(&self) -> bool
pub fn allow_cross_protocol(&self) -> bool
Get cross-protocol discovery status
Sourcepub fn with_metrics(self, enable: bool) -> Self
pub fn with_metrics(self, enable: bool) -> Self
Enable metrics
Sourcepub fn metrics_enabled(&self) -> bool
pub fn metrics_enabled(&self) -> bool
Get metrics status
Sourcepub fn with_rate_limit(self, limit: Duration) -> Self
pub fn with_rate_limit(self, limit: Duration) -> Self
Set rate limit
Sourcepub fn rate_limit(&self) -> Option<Duration>
pub fn rate_limit(&self) -> Option<Duration>
Get rate limit
Sourcepub fn with_cache_duration(self, duration: Duration) -> Self
pub fn with_cache_duration(self, duration: Duration) -> Self
Set cache duration
Sourcepub fn cache_duration(&self) -> Duration
pub fn cache_duration(&self) -> Duration
Get cache duration
Sourcepub fn protocol_timeout(&self) -> Duration
pub fn protocol_timeout(&self) -> Duration
Get protocol timeout
Sourcepub fn has_protocol(&self, protocol: ProtocolType) -> bool
pub fn has_protocol(&self, protocol: ProtocolType) -> bool
Check if a protocol is enabled (alias for is_protocol_enabled)
Sourcepub fn filter(&self) -> Option<&DiscoveryFilter>
pub fn filter(&self) -> Option<&DiscoveryFilter>
Get the discovery filter
Sourcepub fn with_filter(self, filter: DiscoveryFilter) -> Self
pub fn with_filter(self, filter: DiscoveryFilter) -> Self
Set discovery filter
Trait Implementations§
Source§impl Clone for DiscoveryConfig
impl Clone for DiscoveryConfig
Source§fn clone(&self) -> DiscoveryConfig
fn clone(&self) -> DiscoveryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more