Skip to content

Commit 9c8a590

Browse files
Merge pull request #3030 from rabbitmq/mk-vhost-is-tagged-with
Introduce vhost:is_tagged_with/2
2 parents 1399151 + ef1afa4 commit 9c8a590

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

deps/rabbit/src/vhost.erl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
get_description/1,
2727
get_tags/1,
2828
set_limits/2,
29-
set_metadata/2
29+
set_metadata/2,
30+
is_tagged_with/2
3031
]).
3132

3233
-define(record_version, vhost_v2).
@@ -180,3 +181,7 @@ set_metadata(VHost, Value) ->
180181
%% the field is not available, so this is a no-op
181182
VHost
182183
end.
184+
185+
-spec is_tagged_with(vhost:vhost(), atom()) -> boolean().
186+
is_tagged_with(VHost, Tag) ->
187+
lists:member(Tag, get_tags(VHost)).

0 commit comments

Comments
 (0)