aprs.me/lib/aprsme/cluster
Graham McIntire a85f74ec3f
refactor: leadership_change handler pattern-matches instead of cond
Cluster.ConnectionManager.handle_info({:leadership_change, ...}) used
a cond on the (became_leader, node, connection_started) triple. Split
into handle_leadership_change/3 with three clauses:

- became_leader=true, us=true, not already started → start APRS-IS
- became_leader=false, us=true, already started → stop APRS-IS
- everything else → no-op

Makes the three state transitions visible in the function heads and
eliminates one more cond from the codebase.
2026-04-23 14:27:49 -05:00
..
connection_manager.ex refactor: leadership_change handler pattern-matches instead of cond 2026-04-23 14:27:49 -05:00
leader_election.ex refactor: promote hot-path GenServer state maps to structs 2026-04-21 10:26:20 -05:00
packet_distributor.ex refactor: collapse nested if/case into pattern-matched helpers 2026-04-23 13:55:11 -05:00
packet_receiver.ex chore(dialyzer): enable stricter flags and fix 97 resulting findings 2026-04-21 10:07:01 -05:00
topology.ex refactor: collapse nested if/case into pattern-matched helpers 2026-04-23 13:55:11 -05:00