Skip to content

Commit 6dff63a

Browse files
committed
adopt otp27 docs
Signed-off-by: Alejandro M. Ramallo <[email protected]>
1 parent 865a862 commit 6dff63a

File tree

1 file changed

+29
-8
lines changed

1 file changed

+29
-8
lines changed

include/partisan.hrl

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
2+
%% =============================================================================
3+
%% ERLANG VERSION MIGRATION SUPPORT
4+
%% =============================================================================
5+
6+
7+
-if(?OTP_RELEASE >= 27).
8+
-define(MODULEDOC(Str), -moduledoc(Str)).
9+
-define(DOC(Str), -doc(Str)).
10+
-else.
11+
-define(MODULEDOC(Str), -compile([])).
12+
-define(DOC(Str), -compile([])).
13+
-endif.
14+
15+
16+
%% =============================================================================
17+
%% COMMON TYPES
18+
%% =============================================================================
19+
20+
-type optional(T) :: T | undefined.
21+
-type options() :: [{atom(), term()}] | #{atom() => term()}.
22+
-type ttl() :: non_neg_integer().
23+
24+
25+
%% =============================================================================
26+
%% APP
27+
%% =============================================================================
28+
%%
29+
130
-define(APP, partisan).
231
-define(LOCALHOST, {127, 0, 0, 1}).
332
-define(PEER_PORT, 9090).
@@ -154,14 +183,6 @@
154183
-define(PERIODIC_ENABLED, true).
155184

156185

157-
%% COMMON TYPES
158-
-type options() :: [{atom(), term()}] | #{atom() => term()}.
159-
160-
161-
-type ttl() :: non_neg_integer().
162-
-type optional(T) :: T | undefined.
163-
164-
165186
%% =============================================================================
166187
%% ORCHESTRATION
167188
%% =============================================================================

0 commit comments

Comments
 (0)