Adds more hosts to test
- Ptbo both links - Lnsy both links - Blvl both links Adds lib.rs to allow bins to read common code
This commit is contained in:
parent
03de859764
commit
11618c0d0a
@ -10,4 +10,4 @@ ansi_term = "0.12"
|
|||||||
clap = { version = "4.5", features = ["derive"] }
|
clap = { version = "4.5", features = ["derive"] }
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "duration_to_string"
|
name = "duration_to_string"
|
||||||
|
|||||||
@ -5,3 +5,9 @@
|
|||||||
10.12.22.1
|
10.12.22.1
|
||||||
8.8.8.8
|
8.8.8.8
|
||||||
1.1.1.1
|
1.1.1.1
|
||||||
|
24.51.235.162
|
||||||
|
99.214.0.92
|
||||||
|
216.234.202.122
|
||||||
|
24.143.184.98
|
||||||
|
192.186.110.6
|
||||||
|
129.222.197.36
|
||||||
|
|||||||
@ -5,3 +5,9 @@
|
|||||||
10.12.32.1
|
10.12.32.1
|
||||||
8.8.8.8
|
8.8.8.8
|
||||||
1.1.1.1
|
1.1.1.1
|
||||||
|
24.51.235.162
|
||||||
|
99.214.0.92
|
||||||
|
216.234.202.122
|
||||||
|
24.143.184.98
|
||||||
|
192.186.110.6
|
||||||
|
129.222.197.36
|
||||||
|
|||||||
@ -7,19 +7,12 @@ use std::str::FromStr;
|
|||||||
use std::sync::mpsc;
|
use std::sync::mpsc;
|
||||||
use std::time::{Duration, SystemTime};
|
use std::time::{Duration, SystemTime};
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use crate::manager::Manager;
|
use pp::ping_result::PingResult;
|
||||||
use crate::ping_result::PingResult;
|
use pp::ping_request::PingRequest;
|
||||||
use crate::state::State;
|
use pp::manager::Manager;
|
||||||
use crate::target_state::TargetState;
|
use pp::SECONDS_BETWEEN_DISPLAY;
|
||||||
|
use pp::state::State;
|
||||||
mod manager;
|
use pp::target_state::TargetState;
|
||||||
mod state;
|
|
||||||
mod target_state;
|
|
||||||
mod ping_result;
|
|
||||||
mod ping_request;
|
|
||||||
|
|
||||||
const SECONDS_BETWEEN_DISPLAY: u32 = 1;
|
|
||||||
const SECONDS_BETWEEN_PING: u32 = 2;
|
|
||||||
|
|
||||||
fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
|
fn read_lines<P>(filename: P) -> io::Result<io::Lines<io::BufReader<File>>>
|
||||||
where P: AsRef<Path>, {
|
where P: AsRef<Path>, {
|
||||||
9
src/lib.rs
Normal file
9
src/lib.rs
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
pub mod manager;
|
||||||
|
pub mod ping_request;
|
||||||
|
pub mod ping_result;
|
||||||
|
pub mod state;
|
||||||
|
pub mod target_state;
|
||||||
|
|
||||||
|
|
||||||
|
pub const SECONDS_BETWEEN_DISPLAY: u32 = 1;
|
||||||
|
pub const SECONDS_BETWEEN_PING: u32 = 2;
|
||||||
Loading…
x
Reference in New Issue
Block a user