./ct_report/coverage/mongoose_module_metrics.COVER.html

1 -module(mongoose_module_metrics).
2
3 -export([opts_for_module/3]).
4
5 -ignore_xref([behaviour_info/1]).
6
7 -callback config_metrics(mongooseim:host_type()) -> any().
8
9 -optional_callbacks([config_metrics/1]).
10
11 -spec opts_for_module(mongooseim:host_type(), module(), list()) -> list() | tuple().
12 opts_for_module(HostType, Module, OptsToReport) ->
13 683 try
14 683 Opts = gen_mod:get_module_opts(HostType, Module),
15 683 lists:map(
16 fun({OptToReport, DefaultValue}) ->
17 683 Value = proplists:get_value(OptToReport, Opts, DefaultValue),
18 683 {OptToReport, Value}
19 end, OptsToReport)
20 catch
21
:-(
_:_ -> {none, none}
22 end.
Line Hits Source