diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-05-08 12:59:28 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2017-05-08 12:59:28 +0300 |
commit | 01a2c9fe1202f88f20a5acbc729b627ce0ac3c0a (patch) | |
tree | 4aba0e94650d1311ab5b2da0e74563b1bd02a876 /src/ejabberd_router.erl | |
parent | LOG_PATH macro should be of string type (diff) |
Add type specs for Module:opt_type/1
Diffstat (limited to 'src/ejabberd_router.erl')
-rw-r--r-- | src/ejabberd_router.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ejabberd_router.erl b/src/ejabberd_router.erl index 490133d79..844651329 100644 --- a/src/ejabberd_router.erl +++ b/src/ejabberd_router.erl @@ -476,6 +476,16 @@ clean_cache(Node) -> clean_cache() -> ejabberd_cluster:eval_everywhere(?MODULE, clean_cache, [node()]). +-type domain_balancing() :: random | source | destination | + bare_source | bare_destination. +-spec opt_type(domain_balancing) -> fun((domain_balancing()) -> domain_balancing()); + (domain_balancing_component_number) -> fun((pos_integer()) -> pos_integer()); + (router_db_type) -> fun((atom()) -> atom()); + (router_use_cache) -> fun((boolean()) -> boolean()); + (router_cache_missed) -> fun((boolean()) -> boolean()); + (router_cache_size) -> fun((timeout()) -> timeout()); + (router_cache_life_time) -> fun((timeout()) -> timeout()); + (atom()) -> [atom()]. opt_type(domain_balancing) -> fun (random) -> random; (source) -> source; |