about summary refs log tree commit diff
path: root/net/stomp_erl/src/stomp_sup.erl
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2019-12-21T01·21+0000
committerVincent Ambo <tazjin@google.com>2019-12-21T01·21+0000
commit1a281d3bb93fa46e74fb5e5b79a5da38ba48d628 (patch)
tree60127697dcd12debaedd876e53bfba511bc69949 /net/stomp_erl/src/stomp_sup.erl
parent5f4924cfa769fc2be2ddbd8fe6f82cb0b3663409 (diff)
parent32d16e2b02bd9ef112107ae5408a1f8fb7fc92c1 (diff)
merge(stomp.erl): Integrate at //net/stomp_erl r/268
This currently has no build configuration.
Diffstat (limited to 'net/stomp_erl/src/stomp_sup.erl')
-rw-r--r--net/stomp_erl/src/stomp_sup.erl22
1 files changed, 22 insertions, 0 deletions
diff --git a/net/stomp_erl/src/stomp_sup.erl b/net/stomp_erl/src/stomp_sup.erl
new file mode 100644
index 000000000000..3a298bc9bf8b
--- /dev/null
+++ b/net/stomp_erl/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]}.