generated from PlexSheep/baserepo
monitoring with repeat and defaults
defaults can also be toggled off
This commit is contained in:
parent
763f734649
commit
02be0f5d15
1 changed files with 13 additions and 5 deletions
|
@ -15,6 +15,8 @@
|
||||||
#![warn(clippy::pedantic)]
|
#![warn(clippy::pedantic)]
|
||||||
|
|
||||||
//// IMPORTS ///////////////////////////////////////////////////////////////////////////////////////
|
//// IMPORTS ///////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
use libpt;
|
||||||
|
|
||||||
use clap::{Args, Parser, Subcommand};
|
use clap::{Args, Parser, Subcommand};
|
||||||
|
|
||||||
use clap_num::number_range;
|
use clap_num::number_range;
|
||||||
|
@ -85,14 +87,20 @@ pub enum Commands {
|
||||||
pub enum NetCommands {
|
pub enum NetCommands {
|
||||||
/// monitor your network
|
/// monitor your network
|
||||||
Monitor {
|
Monitor {
|
||||||
#[clap(short, long)]
|
/// repeat every N milliseconds, 0 means no repeat
|
||||||
repeat: bool,
|
#[clap(short, long, default_value_t = 0, name = "N")]
|
||||||
|
repeat: u64,
|
||||||
|
|
||||||
|
/// At what percentage should the try be considered successful
|
||||||
#[clap(short, long, default_value_t = 100, value_parser=max100)]
|
#[clap(short, long, default_value_t = 100, value_parser=max100)]
|
||||||
percentage_for_success: u8,
|
success_ratio: u8,
|
||||||
|
|
||||||
#[arg(default_values_t = ["https://cloudflare.com".to_string()])]
|
/// extra URLs to check with
|
||||||
additional_domains: Vec<String>,
|
extra_urls: Vec<String>,
|
||||||
|
|
||||||
|
/// Don't check for default URLs
|
||||||
|
#[clap(short, long)]
|
||||||
|
no_default: bool
|
||||||
|
|
||||||
},
|
},
|
||||||
/// discover hosts in your network
|
/// discover hosts in your network
|
||||||
|
|
Reference in a new issue