Jido.Sensors.Heartbeat (Jido v2.0.0-rc.1)
View SourceA sensor that emits heartbeat signals at configurable intervals.
Configuration
interval- Interval between heartbeats in milliseconds (default: 5000)message- Message to include in heartbeat signal (default: "heartbeat")
Example
# Start via SensorServer
{:ok, pid} = Jido.Sensor.Runtime.start_link(
sensor: Jido.Sensors.Heartbeat,
config: %{interval: 1000, message: "alive"}
)
Summary
Functions
Returns metadata for Jido.Discovery integration.
Returns the sensor's description.
Returns the sensor's name.
Returns the Zoi schema for sensor configuration.
Returns the sensor specification.
Functions
@spec __sensor_metadata__() :: map()
Returns metadata for Jido.Discovery integration.
This function is used by Jido.Discovery to index sensors
for fast lookup and filtering.
@spec description() :: String.t() | nil
Returns the sensor's description.
@spec name() :: String.t()
Returns the sensor's name.
@spec schema() :: Zoi.schema() | nil
Returns the Zoi schema for sensor configuration.
@spec spec() :: Jido.Sensor.Spec.t()
Returns the sensor specification.
The spec contains all metadata needed to configure and run the sensor.