summaryrefslogtreecommitdiffstats
path: root/src/app.rs
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2021-01-01 18:09:28 -0500
committerGitHub <noreply@github.com>2021-01-01 18:09:28 -0500
commit90be9730a62e2a935ccf01cdd6e320c65624722a (patch)
treeb22a66210a2af97f0ced92dc27d89a6ad2137f63 /src/app.rs
parentd8d72d060d4bd4473bfe769673a2227bda948c97 (diff)
feature: Add network interface filtering (#381)
Adds a new option in the config file to filter out network interfaces. Also add the option to filter by whole words. Interface follows that of the existing ones: ```toml [net_filter] is_list_ignored = false list = ["virbr0.*"] regex = true case_sensitive = false whole_word = false ```
Diffstat (limited to 'src/app.rs')
-rw-r--r--src/app.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/app.rs b/src/app.rs
index 7fae7cf0..5b2dbe90 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -57,12 +57,14 @@ pub struct AppConfigFields {
}
/// For filtering out information
+#[derive(Debug, Clone)]
pub struct DataFilters {
pub disk_filter: Option<Filter>,
pub temp_filter: Option<Filter>,
+ pub net_filter: Option<Filter>,
}
-#[derive(Debug)]
+#[derive(Debug, Clone)]
pub struct Filter {
pub is_list_ignored: bool,
pub list: Vec<regex::Regex>,