diff options
author | Vincent Ambo <vincent@kivra.com> | 2016-02-08T23·36+0100 |
---|---|---|
committer | Vincent Ambo <vincent@kivra.com> | 2016-02-08T23·36+0100 |
commit | 0d608be29cbf75ecfc88a7be962130f3a5a38137 (patch) | |
tree | 6c6d788f0f0eef64076afbd8182666cee27bd760 /src/stomp_sup.erl | |
parent | fca24f14f72e00f22e10438253784f77a806d813 (diff) |
[stomp_sup] Add stomp_worker spec
Diffstat (limited to 'src/stomp_sup.erl')
-rw-r--r-- | src/stomp_sup.erl | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/stomp_sup.erl b/src/stomp_sup.erl new file mode 100644 index 000000000000..96d4aafb9fba --- /dev/null +++ b/src/stomp_sup.erl @@ -0,0 +1,22 @@ +-module(stomp_sup). +-behaviour(supervisor). + +-export([start_link/0]). +-export([init/1]). + +start_link() -> + supervisor:start_link({local, ?MODULE}, ?MODULE, []). + +init([]) -> + Procs = [stomp_spec()], + {ok, {{one_for_one, 1, 5}, Procs}}. + +%% Private + +stomp_spec() -> + #{id => stomp_proc, + start => {stomp_worker, start_link, []}, + restart => permanent, + shutdown => 5000, + type => worker, + module => [stomp_worker]} |