-type option() ::
{connect_options , [connect_option()]}
- | {consumption_interval , erlang:time()}
+ | {consumption_interval , non_neg_integer()}
.
-record(state,
{ connect_options = [] :: [connect_option()]
- , sock = none :: hope_option:t(gen_tcp:socket())
+ , sock = none :: hope_option:t(Socket :: port())
}).
-type state() ::
-define(GRAPHITE_PATH_PREFIX, "beam_stats").
-spec init([option()]) ->
- {erlang:time(), state()}.
+ {non_neg_integer(), state()}.
init(Options) ->
ConnectOptions = hope_kv_list:get(Options, connect_options , []),
ConsumptionInterval = hope_kv_list:get(Options, consumption_interval, 60000),