diff options
author | Michael Klishin <klishinm@vmware.com> | 2021-05-09 00:18:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-09 00:18:53 +0300 |
commit | 9c8a5907380df9e666c7e8cb1b0124cea21588a2 (patch) | |
tree | 7ec639177163079d5fa4aaa5af6a8d5a9d3659ba | |
parent | 139915103080f557afd91be4559496cd818d64bf (diff) | |
parent | ef1afa44c4929152f67ca97d2f80613e739b32ef (diff) | |
download | rabbitmq-server-git-9c8a5907380df9e666c7e8cb1b0124cea21588a2.tar.gz |
Merge pull request #3030 from rabbitmq/mk-vhost-is-tagged-with
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)). |