diff options
author | Michael Klishin <michael@clojurewerkz.org> | 2021-05-08 23:49:13 +0300 |
---|---|---|
committer | Michael Klishin <michael@clojurewerkz.org> | 2021-05-09 00:16:09 +0300 |
commit | ef1afa44c4929152f67ca97d2f80613e739b32ef (patch) | |
tree | 7ec639177163079d5fa4aaa5af6a8d5a9d3659ba | |
parent | 139915103080f557afd91be4559496cd818d64bf (diff) | |
download | rabbitmq-server-git-ef1afa44c4929152f67ca97d2f80613e739b32ef.tar.gz |
Introduce vhost:is_tagged_with/2
-rw-r--r-- | deps/rabbit/src/vhost.erl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/deps/rabbit/src/vhost.erl b/deps/rabbit/src/vhost.erl index 2237cc9681..87dc463ef6 100644 --- a/deps/rabbit/src/vhost.erl +++ b/deps/rabbit/src/vhost.erl @@ -26,7 +26,8 @@ get_description/1, get_tags/1, set_limits/2, - set_metadata/2 + set_metadata/2, + is_tagged_with/2 ]). -define(record_version, vhost_v2). @@ -180,3 +181,7 @@ set_metadata(VHost, Value) -> %% the field is not available, so this is a no-op VHost end. + +-spec is_tagged_with(vhost:vhost(), atom()) -> boolean(). +is_tagged_with(VHost, Tag) -> + lists:member(Tag, get_tags(VHost)). |