1 |
|
-module(mongoose_graphql_union). |
2 |
|
-export([execute/1]). |
3 |
|
|
4 |
|
-ignore_xref([execute/1]). |
5 |
|
|
6 |
|
-include("mongoose_logger.hrl"). |
7 |
|
|
8 |
16 |
execute(#{<<"type">> := _, <<"binValue">> := _}) -> {ok, <<"ImageData">>}; |
9 |
24 |
execute(#{<<"extValue">> := _}) -> {ok, <<"External">>}; |
10 |
4 |
execute(#{<<"phonetic">> := _}) -> {ok, <<"Phonetic">>}; |
11 |
4 |
execute(#{<<"binValue">> := _}) -> {ok, <<"BinValue">>}; |
12 |
8 |
execute(#{<<"vcard">> := _}) -> {ok, <<"AgentVcard">>}; |
13 |
|
execute(#{<<"type">> := <<"histogram">>, <<"name">> := _, <<"p50">> := _}) -> |
14 |
294 |
{ok, <<"HistogramMetric">>}; |
15 |
|
execute(#{<<"type">> := <<"spiral">>, <<"name">> := _, <<"one">> := _}) -> |
16 |
1017 |
{ok, <<"SpiralMetric">>}; |
17 |
|
execute(#{<<"type">> := <<"counter">>, <<"name">> := _, <<"ms_since_reset">> := _}) -> |
18 |
31 |
{ok, <<"CounterMetric">>}; |
19 |
|
execute(#{<<"type">> := <<"gauge">>, <<"name">> := _, <<"value">> := _}) -> |
20 |
24 |
{ok, <<"GaugeMetric">>}; |
21 |
|
execute(#{<<"type">> := <<"merged_inet_stats">>, <<"connections">> := _}) -> |
22 |
4 |
{ok, <<"MergedInetStatsMetric">>}; |
23 |
|
execute(#{<<"type">> := <<"vm_stats_memory">>, <<"processes_used">> := _}) -> |
24 |
4 |
{ok, <<"VMStatsMemoryMetric">>}; |
25 |
|
execute(#{<<"type">> := <<"vm_system_info">>, <<"port_count">> := _}) -> |
26 |
4 |
{ok, <<"VMSystemInfoMetric">>}; |
27 |
|
execute(#{<<"type">> := <<"probe_queues">>, <<"fsm">> := _}) -> |
28 |
4 |
{ok, <<"ProbeQueuesMetric">>}; |
29 |
|
execute(#{<<"type">> := <<"rdbms_stats">>, <<"workers">> := _}) -> |
30 |
:-( |
{ok, <<"RDBMSStatsMetric">>}. |