From: Paul Oliver Date: Fri, 21 Aug 2015 08:55:06 +0000 (+0200) Subject: Use module() instead of atom() where applicable X-Git-Tag: 0.0.1~1^2 X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=25ef8cdae5c39135121c6b617fea747315dea3ff;p=beam_stats.git Use module() instead of atom() where applicable --- diff --git a/src/beam_stats_config.erl b/src/beam_stats_config.erl index 45d0fc9..a6d5d6d 100644 --- a/src/beam_stats_config.erl +++ b/src/beam_stats_config.erl @@ -17,7 +17,7 @@ production_interval() -> get_env(production_interval). -spec consumers() -> - [{ConsumerModule :: atom(), ConsumerDefinedOptionsData :: term()}]. + [{ConsumerModule :: module(), ConsumerDefinedOptionsData :: term()}]. consumers() -> get_env(consumers). diff --git a/src/beam_stats_consumer.erl b/src/beam_stats_consumer.erl index fa06695..eb8cbb7 100644 --- a/src/beam_stats_consumer.erl +++ b/src/beam_stats_consumer.erl @@ -52,7 +52,7 @@ -define(SIGNAL_CONSUMPTION , beam_stats_consumption_signal). -record(state, - { consumer_module :: atom() + { consumer_module :: module() , consumer_state :: term() , consumption_interval :: non_neg_integer() , beam_stats_queue :: queue() @@ -62,7 +62,7 @@ %% Public API %% ============================================================================ --spec add(atom(), term()) -> +-spec add(module(), term()) -> supervisor:startchild_ret(). add(ConsumerModule, ConsumerOptions) -> beam_stats_sup_consumers:start_child(ConsumerModule, ConsumerOptions).