1%% 2%% %CopyrightBegin% 3%% 4%% Copyright Ericsson AB 2010-2019. All Rights Reserved. 5%% 6%% Licensed under the Apache License, Version 2.0 (the "License"); 7%% you may not use this file except in compliance with the License. 8%% You may obtain a copy of the License at 9%% 10%% http://www.apache.org/licenses/LICENSE-2.0 11%% 12%% Unless required by applicable law or agreed to in writing, software 13%% distributed under the License is distributed on an "AS IS" BASIS, 14%% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15%% See the License for the specific language governing permissions and 16%% limitations under the License. 17%% 18%% %CopyrightEnd% 19%% 20 21%% 22%% The supervisor of the static server processes. 23%% 24 25-module(diameter_misc_sup). 26 27-behaviour(supervisor). 28 29-export([start_link/0]). %% supervisor start 30 31%% supervisor callback 32-export([init/1]). 33 34-define(CHILDREN, [diameter_sync, %% serialization 35 diameter_stats, %% statistics counter management 36 diameter_reg, %% service/property publishing 37 diameter_peer, %% remote peer manager 38 diameter_dist, %% request distribution 39 diameter_config]). %% configuration/restart 40 41%% start_link/0 42 43start_link() -> 44 SupName = {local, ?MODULE}, 45 supervisor:start_link(SupName, ?MODULE, []). 46 47%% init/1 48 49init([]) -> 50 Flags = {one_for_one, 1, 5}, 51 Workers = lists:map(fun spec/1, ?CHILDREN), 52 {ok, {Flags, Workers}}. 53 54spec(Mod) -> 55 {Mod, 56 {Mod, start_link, []}, 57 permanent, 58 1000, 59 worker, 60 [Mod]}. 61