%%%------------------------------------------------------------------- %% @doc xdg_pipe_menu top level supervisor. %% @end %%%------------------------------------------------------------------- -module(xdg_pipe_menu_sup). -behaviour(supervisor). -export([start_link/0]). -export([init/1]). -define(SERVER, ?MODULE). start_link() -> supervisor:start_link({local, ?SERVER}, ?MODULE, []). %% sup_flags() = #{strategy => strategy(), % optional %% intensity => non_neg_integer(), % optional %% period => pos_integer()} % optional %% child_spec() = #{id => child_id(), % mandatory %% start => mfargs(), % mandatory %% restart => restart(), % optional %% shutdown => shutdown(), % optional %% type => worker(), % optional %% modules => modules()} % optional init([]) -> SupFlags = #{ strategy => one_for_all, intensity => 5, period => 10 }, ChildSpecs = [ #{id => xdg_pipe_menu_cache, start => {xdg_pipe_menu_cache, start_link, []}}, #{id => xdg_pipe_menu_watcher, start => {xdg_pipe_menu_watcher, start_link, []}}, #{id => xdg_pipe_menu_socket, start => {xdg_pipe_menu_socket, start_link, []}} ], {ok, {SupFlags, ChildSpecs}}. %% internal functions