summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon MacMullen <simon@rabbitmq.com>2010-07-29 18:02:21 +0100
committerSimon MacMullen <simon@rabbitmq.com>2010-07-29 18:02:21 +0100
commite45d0f8c0161a416e61ca85912224e4c27f9d55d (patch)
treeeb48ea63e372df080559f9c50c8a09c996bba52c /src
parent6eb05bcedfe1985d911f2ebc88233a8cc63771db (diff)
downloadrabbitmq-server-git-e45d0f8c0161a416e61ca85912224e4c27f9d55d.tar.gz
Add an attempt at specs. The second part of the state type should not be an atom but a timer; however I can't find that easily.
Diffstat (limited to 'src')
-rw-r--r--src/rabbit_event.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/rabbit_event.erl b/src/rabbit_event.erl
index ddb1287382..d784a6aafc 100644
--- a/src/rabbit_event.erl
+++ b/src/rabbit_event.erl
@@ -37,6 +37,14 @@
-export([stats_level/1]).
-export([notify/2]).
+-opaque(state() :: {atom(), atom()}).
+
+-spec(init_stats_timer/0 :: () -> state()).
+-spec(ensure_stats_timer/3 ::
+ (state(), fun (() -> 'ok'), fun (() -> 'ok')) -> state()).
+-spec(stop_stats_timer/2 :: (state(), fun (() -> 'ok')) -> state()).
+-spec(stats_level/1 :: (state()) -> atom()).
+-spec(notify/2 :: (atom(), term()) -> 'ok').
-record(state, {level, timer}).