set_close_circuits

Function set_close_circuits 

Source
pub fn set_close_circuits(value: bool)
Expand description

Sets the global close circuits flag.

Controls whether circuits are actually closed when attacks are detected. Set to false for monitoring-only mode where attacks are logged but circuits are not closed.

§Arguments

  • value - true to enable circuit closure, false for monitoring only

§Thread Safety

This function uses atomic operations and is safe to call from any thread.

§Example

use vanguards_rs::control::{set_close_circuits, get_close_circuits};

// Enable monitoring-only mode
set_close_circuits(false);
assert!(!get_close_circuits());

// Re-enable circuit closure
set_close_circuits(true);
assert!(get_close_circuits());