|
|
@ -0,0 +1,25 @@ |
|
|
|
-module(eSync_sup). |
|
|
|
|
|
|
|
-behaviour(supervisor). |
|
|
|
|
|
|
|
-export([ |
|
|
|
start_link/0 |
|
|
|
, init/1 |
|
|
|
]). |
|
|
|
|
|
|
|
start_link() -> |
|
|
|
supervisor:start_link({local, ?MODULE}, ?MODULE, []). |
|
|
|
|
|
|
|
init([]) -> |
|
|
|
SupFlags = #{strategy => one_for_one, intensity => 5, period => 10}, |
|
|
|
ChildSpecs = [ |
|
|
|
#{ |
|
|
|
id => eSync, |
|
|
|
start => {eSync, start_link, []}, |
|
|
|
restart => permanent, |
|
|
|
shutdown => brutal_kill, |
|
|
|
type => worker, |
|
|
|
modules => [eSync] |
|
|
|
}], |
|
|
|
{ok, {SupFlags, ChildSpecs}}. |
|
|
|
|