diff options
| author | Michael Klishin <mklishin@pivotal.io> | 2019-04-13 00:36:03 +0400 |
|---|---|---|
| committer | Michael Klishin <michael@clojurewerkz.org> | 2019-04-13 02:30:01 +0400 |
| commit | d43970fa5bafa972f442471a99fc74bba58bd10f (patch) | |
| tree | e54361b12f1cc697fec119849e643e223974f4e4 /src | |
| parent | fc5eb6c73b24773b80e8cbf8620cadbe4f98f462 (diff) | |
| download | rabbitmq-server-git-d43970fa5bafa972f442471a99fc74bba58bd10f.tar.gz | |
Introduce rabbit_vhost:count/0
(cherry picked from commit dc3c04ffc3862d89d24f55594ae62ab0f8747fdd)
Diffstat (limited to 'src')
| -rw-r--r-- | src/rabbit_vhost.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rabbit_vhost.erl b/src/rabbit_vhost.erl index 80b726b4bb..8ab5a09725 100644 --- a/src/rabbit_vhost.erl +++ b/src/rabbit_vhost.erl @@ -21,7 +21,7 @@ %%---------------------------------------------------------------------------- -export([recover/0, recover/1]). --export([add/2, delete/2, exists/1, list/0, with/2, with_user_and_vhost/3, assert/1, update/2, +-export([add/2, delete/2, exists/1, list/0, count/0, with/2, with_user_and_vhost/3, assert/1, update/2, set_limits/2, limits_of/1, vhost_cluster_state/1, is_running_on_all_nodes/1, await_running_on_all_nodes/2]). -export([info/1, info/2, info_all/0, info_all/1, info_all/2, info_all/3]). -export([dir/1, msg_store_dir_path/1, msg_store_dir_wildcard/0]). @@ -241,6 +241,10 @@ exists(VHostPath) -> list() -> mnesia:dirty_all_keys(rabbit_vhost). +-spec count() -> non_neg_integer(). +count() -> + length(list()). + -spec with(rabbit_types:vhost(), rabbit_misc:thunk(A)) -> A. with(VHostPath, Thunk) -> |
