-module(fd_httpd). -vsn("0.2.0"). -behaviour(supervisor). -author("Peter Harpending "). -copyright("Peter Harpending "). -license("BSD-2-Clause-FreeBSD"). -export([start_link/0]). -export([init/1]). -spec start_link() -> {ok, pid()}. %% @private %% This supervisor's own start function. start_link() -> supervisor:start_link({local, ?MODULE}, ?MODULE, []). -spec init([]) -> {ok, {supervisor:sup_flags(), [supervisor:child_spec()]}}. %% @private %% The OTP init/1 function. init([]) -> RestartStrategy = {one_for_one, 1, 60}, WebRTC = {fd_httpd_webrtc, {fd_httpd_webrtc, start_link, []}, permanent, 5000, worker, [fd_httpd_webrtc]}, FileCache = {fd_httpd_sfc, {fd_httpd_sfc, start_link, []}, permanent, 5000, worker, [fd_httpd_sfc]}, Clients = {fd_httpd_clients, {fd_httpd_clients, start_link, []}, permanent, 5000, supervisor, [fd_httpd_clients]}, Children = [WebRTC, FileCache, Clients], %Children = [FileCache, Clients], {ok, {RestartStrategy, Children}}.