This commit is contained in:
2026-04-17 21:36:56 +03:00
commit 7e776ea6e3
11 changed files with 643 additions and 0 deletions

28
src/infra/infra_sup.erl Normal file
View File

@@ -0,0 +1,28 @@
%% Супервизор верхнего уровня
-module(infra_sup).
-behaviour(supervisor).
-export([start_link/0]).
-export([init/1]).
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
init([]) ->
SupFlags = #{strategy => one_for_one, intensity => 5, period => 10},
Mnesia = #{
id => infra_mnesia,
start => {infra_mnesia, start_link, []},
restart => permanent,
shutdown => 5000,
type => worker,
modules => [infra_mnesia]
},
% Временная заглушка для HTTP-сервера (будет добавлен позже)
% Cowboy = #{...}
ChildSpecs = [Mnesia],
{ok, {SupFlags, ChildSpecs}}.