23 lines
454 B
Elixir
23 lines
454 B
Elixir
defmodule Localiser.MQTT.Supervisor do
|
|
@moduledoc """
|
|
Supervisor responsible for managing MQTT-related processes.
|
|
"""
|
|
|
|
use Supervisor
|
|
|
|
def start_link(opts) do
|
|
Supervisor.start_link(__MODULE__, opts, name: __MODULE__)
|
|
end
|
|
|
|
@impl true
|
|
def init(_opts) do
|
|
children = [
|
|
Localiser.MQTT.Connection,
|
|
Localiser.MQTT.Router,
|
|
Localiser.MQTT.Telemetry
|
|
]
|
|
|
|
Supervisor.init(children, strategy: :rest_for_one)
|
|
end
|
|
end
|