home
/
code
/
beam_stats.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implement deltas server, replacing beam_stats_state.
[beam_stats.git]
/
src
/
beam_stats_sup.erl
diff --git
a/src/beam_stats_sup.erl
b/src/beam_stats_sup.erl
index
7cfec55
..
d582df4
100644
(file)
--- a/
src/beam_stats_sup.erl
+++ b/
src/beam_stats_sup.erl
@@
-3,30
+3,30
@@
-behaviour(supervisor).
%% API
-behaviour(supervisor).
%% API
--export([start_link/
0
]).
+-export([start_link/
1
]).
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
%% Supervisor callbacks
-export([init/1]).
%% Helper macro for declaring children of supervisor
--define(CHILD(Type, Module),
- {Module, {Module, start_link,
[]
}, permanent, 5000, Type, [Module]}).
+-define(CHILD(Type, Module
, Args
),
+ {Module, {Module, start_link,
Args
}, permanent, 5000, Type, [Module]}).
%% ===================================================================
%% API functions
%% ===================================================================
%% ===================================================================
%% API functions
%% ===================================================================
-start_link() ->
- supervisor:start_link({local, ?MODULE}, ?MODULE,
[]
).
+start_link(
DeltasServer
) ->
+ supervisor:start_link({local, ?MODULE}, ?MODULE,
DeltasServer
).
%% ===================================================================
%% Supervisor callbacks
%% ===================================================================
%% ===================================================================
%% Supervisor callbacks
%% ===================================================================
-init(
[]
) ->
+init(
DeltasServer
) ->
Children =
Children =
-
[ ?CHILD(worker , beam_stats_producer
)
-
, ?CHILD(supervisor , beam_stats_sup_consumers
)
-
],
+
[ ?CHILD(worker , beam_stats_producer , [DeltasServer]
)
+
, ?CHILD(supervisor , beam_stats_sup_consumers, []
)
+ ],
SupFlags = {one_for_one, 5, 10},
{ok, {SupFlags, Children}}.
SupFlags = {one_for_one, 5, 10},
{ok, {SupFlags, Children}}.
This page took
0.024864 seconds
and
4
git commands to generate.