Entropy (Entropy v0.1.0)
View SourceThe public interface for the Entropy system.
This module serves as the primary entry point for controlling the chaos daemon
and querying its operational status. It abstracts the underlying GenServer
calls to the Entropy.State namespace.
Purpose
- Status Reporting: Query the liveness and safety state of the system.
- Runtime Control: Trigger configuration reloads without restarting the node.
Summary
Functions
Determines if the Entropy supervision tree is active.
Determines if the system environment permits fault injection.
Reloads runtime configuration parameters.
Functions
@spec is_alive?() :: boolean()
Determines if the Entropy supervision tree is active.
Returns true if the Entropy.Supervisor process exists and is alive,
otherwise false.
@spec is_ready?() :: boolean()
Determines if the system environment permits fault injection.
Queries the CircuitBreaker to verify that system metrics (CPU, Memory) are
within defined safety thresholds.
Returns true only if the circuit breaker reports a safe state.
@spec reload_config() :: :ok
Reloads runtime configuration parameters.
Fetches the latest values from Entropy.Config and pushes updates to:
- Scheduler: Updates the injection frequency (
injection_interval_ms). - CircuitBreaker: Updates safety thresholds (
max_cpu_util_percent,max_memory_util_percent).
This function allows tuning the aggression of the tool without a restart.