Skip to content

Commit 883dcd2

Browse files
Merge branch 'tvhong-amazon-tvhong/fix_type_specs'
(cherry picked from commit 6a97901)
1 parent 17ffe60 commit 883dcd2

File tree

6 files changed

+7
-10
lines changed

6 files changed

+7
-10
lines changed

deps/rabbit_common/src/rabbit_peer_discovery_backend.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@
5454

5555
-callback lock(Node :: atom()) -> {ok, Data :: term()} | not_supported | {error, Reason :: string()}.
5656

57-
-callback unlock(Data :: term()) -> ok | {error, Reason :: string()}.
57+
-callback unlock(Data :: term()) -> ok.
5858

5959
-optional_callbacks([init/0]).

deps/rabbitmq_peer_discovery_aws/src/rabbit_peer_discovery_aws.erl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,15 @@ lock(Node) ->
144144
Error
145145
end.
146146

147-
-spec unlock({{ResourceId :: string(), LockRequesterId :: node()}, Nodes :: [node()]}) ->
148-
ok | {error, Reason :: string()}.
149-
147+
-spec unlock({{ResourceId :: string(), LockRequestedId :: atom()}, Nodes :: [atom()]}) -> 'ok'.
150148
unlock({LockId, Nodes}) ->
151149
global:del_lock(LockId, Nodes),
152150
ok.
153151

154152
%%
155153
%% Implementation
156154
%%
155+
157156
-spec get_config_key(Key :: atom(), Map :: #{atom() => peer_discovery_config_value()})
158157
-> peer_discovery_config_value().
159158

deps/rabbitmq_peer_discovery_aws/src/rabbitmq_peer_discovery_aws.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,6 @@ post_registration() ->
4949
lock(Node) ->
5050
?DELEGATE:lock(Node).
5151

52-
-spec unlock({ResourceId :: string(), LockRequesterId :: node()}) -> ok | {error, Reason :: string()}.
52+
-spec unlock({{ResourceId :: string(), LockRequestedId :: atom()}, Nodes :: [atom()]}) -> 'ok'.
5353
unlock(Data) ->
5454
?DELEGATE:unlock(Data).

deps/rabbitmq_peer_discovery_common/include/rabbit_peer_discovery.hrl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
% by `httpc`
1313
-define(DEFAULT_HTTP_TIMEOUT, 2250).
1414

15-
-type peer_discovery_config_value() :: atom() | integer() | string() | undefined.
15+
-type peer_discovery_config_value() :: atom() | integer() | string() | list() | map() | any() | undefined.
1616

1717
-record(peer_discovery_config_entry_meta,
1818
{env_variable :: string(),

deps/rabbitmq_peer_discovery_k8s/src/rabbit_peer_discovery_k8s.erl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,7 @@ lock(Node) ->
9696
Error
9797
end.
9898

99-
-spec unlock({{ResourceId :: string(), LockRequesterId :: node()}, Nodes :: [node()]}) ->
100-
ok | {error, Reason :: string()}.
101-
99+
-spec unlock({{ResourceId :: string(), LockRequestedId :: atom()}, Nodes :: [atom()]}) -> 'ok'.
102100
unlock({LockId, Nodes}) ->
103101
global:del_lock(LockId, Nodes),
104102
ok.

deps/rabbitmq_peer_discovery_k8s/src/rabbitmq_peer_discovery_k8s.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ post_registration() ->
4848
lock(Node) ->
4949
?DELEGATE:lock(Node).
5050

51-
-spec unlock({ResourceId :: string(), LockRequesterId :: node()}) -> ok | {error, Reason :: string()}.
51+
-spec unlock({{ResourceId :: string(), LockRequestedId :: atom()}, Nodes :: [atom()]}) -> 'ok'.
5252
unlock(Data) ->
5353
?DELEGATE:unlock(Data).
5454

0 commit comments

Comments
 (0)