NervesGate.Indicators (nerves_gate v0.1.0)

Copy Markdown

Three status LEDs and fixed, release-only button gestures.

identify/1 overrides the LEDs for five seconds, then resumes current status. status/1 is read-only; observe/1 subscribes the caller to change hints. Recovery runs in one bounded worker and is never automatically retried.

Summary

Functions

Returns a specification to start this module under a supervisor.

Identify for five seconds, rejecting overlap and unavailable LED channels.

Subscribe to change hints; reread status after each notification.

Read current LED patterns, button availability and the last recovery outcome.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

identify(server \\ __MODULE__)

@spec identify(GenServer.server()) :: :ok | {:error, term()}

Identify for five seconds, rejecting overlap and unavailable LED channels.

observe(server \\ __MODULE__)

@spec observe(GenServer.server()) :: :ok | {:error, :unavailable}

Subscribe to change hints; reread status after each notification.

start_link(opts \\ [])

status(server \\ __MODULE__)

@spec status(GenServer.server()) :: map()

Read current LED patterns, button availability and the last recovery outcome.

unavailable()