@@ -35,6 +35,8 @@ pub struct TelemetryConfig {
3535 pub auth : Option < AuthConfig > ,
3636 #[ serde( default = "default_service_name" ) ]
3737 pub service_name : String ,
38+ #[ serde( default = "default_enabled" ) ]
39+ pub enabled : bool ,
3840}
3941
4042#[ derive( Debug , Clone , Deserialize , Serialize ) ]
@@ -82,6 +84,10 @@ fn default_service_name() -> String {
8284 "clamreef" . to_string ( )
8385}
8486
87+ fn default_enabled ( ) -> bool {
88+ true
89+ }
90+
8591fn default_interval ( ) -> u64 {
8692 60
8793}
@@ -449,6 +455,7 @@ schedule = "0 0 */6 * * *"
449455 insecure : false ,
450456 auth : None ,
451457 service_name : "clamreef" . to_string ( ) ,
458+ enabled : true ,
452459 } ,
453460 clamav : ClamAVConfig {
454461 socket_path : None ,
@@ -483,6 +490,7 @@ schedule = "0 0 */6 * * *"
483490 insecure : false ,
484491 auth : None ,
485492 service_name : "clamreef" . to_string ( ) ,
493+ enabled : true ,
486494 } ,
487495 clamav : ClamAVConfig {
488496 socket_path : Some ( "/var/run/clamav/clamd.ctl" . to_string ( ) ) ,
@@ -525,6 +533,7 @@ schedule = "0 0 */6 * * *"
525533 insecure : false ,
526534 auth : None ,
527535 service_name : "clamreef" . to_string ( ) ,
536+ enabled : true ,
528537 } ,
529538 clamav : ClamAVConfig {
530539 socket_path : Some ( "/var/run/clamav/clamd.ctl" . to_string ( ) ) ,
@@ -567,6 +576,7 @@ schedule = "0 0 */6 * * *"
567576 insecure : false ,
568577 auth : None ,
569578 service_name : "clamreef" . to_string ( ) ,
579+ enabled : true ,
570580 } ,
571581 clamav : ClamAVConfig {
572582 socket_path : Some ( "/var/run/clamav/clamd.ctl" . to_string ( ) ) ,
@@ -718,6 +728,7 @@ schedule = "0 0 */6 * * *"
718728 insecure : true ,
719729 auth : None ,
720730 service_name : "clamreef" . to_string ( ) ,
731+ enabled : true ,
721732 } ,
722733 clamav : ClamAVConfig {
723734 socket_path : None ,
0 commit comments