pub struct ProbeSetting {
pub ip_addr: IpAddr,
pub hostname: String,
pub ports: Vec<u16>,
pub connect_timeout: Duration,
pub read_timeout: Duration,
pub accept_invalid_certs: bool,
pub payload_map: HashMap<u16, PayloadInfo>,
pub concurrent_limit: usize,
}
Expand description
Probe setting for service detection
Fields§
§ip_addr: IpAddr
Destination IP address
hostname: String
Destination Host Name
ports: Vec<u16>
Target ports for service detection
connect_timeout: Duration
TCP connect (open) timeout
read_timeout: Duration
TCP read timeout
accept_invalid_certs: bool
SSL/TLS certificate validation when detecting HTTPS services.
Default value is false, which means validation is enabled.
payload_map: HashMap<u16, PayloadInfo>
Payloads for specified ports.
If not set, default null probe will be used. (No payload, just open TCP connection and read response)
concurrent_limit: usize
Concurrent connection limit for service detection
Implementations§
Source§impl ProbeSetting
impl ProbeSetting
Sourcepub fn new() -> ProbeSetting
pub fn new() -> ProbeSetting
Create new ProbeSetting
pub fn default( ip_addr: IpAddr, hostname: String, ports: Vec<u16>, ) -> ProbeSetting
Sourcepub fn with_ip_addr(&mut self, ip_addr: IpAddr) -> &mut Self
pub fn with_ip_addr(&mut self, ip_addr: IpAddr) -> &mut Self
Set Destination IP address
Sourcepub fn with_hostname(&mut self, hostname: String) -> &mut Self
pub fn with_hostname(&mut self, hostname: String) -> &mut Self
Set Destination Host Name. If IP address is not set, it will be resolved from the hostname.
Sourcepub fn set_connect_timeout_millis(&mut self, connect_timeout_millis: u64)
pub fn set_connect_timeout_millis(&mut self, connect_timeout_millis: u64)
Set connect (open) timeout in milliseconds
Sourcepub fn set_read_timeout_millis(&mut self, read_timeout_millis: u64)
pub fn set_read_timeout_millis(&mut self, read_timeout_millis: u64)
Set TCP read timeout in milliseconds
Trait Implementations§
Source§impl Clone for ProbeSetting
impl Clone for ProbeSetting
Source§fn clone(&self) -> ProbeSetting
fn clone(&self) -> ProbeSetting
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for ProbeSetting
impl RefUnwindSafe for ProbeSetting
impl Send for ProbeSetting
impl Sync for ProbeSetting
impl Unpin for ProbeSetting
impl UnwindSafe for ProbeSetting
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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