mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Describe option type of 'domain_balancing'
This commit is contained in:
parent
09ab01084d
commit
1d452c98c1
@ -344,8 +344,8 @@ do_route(OrigFrom, OrigTo, OrigPacket) ->
|
||||
end;
|
||||
Rs ->
|
||||
Value = case
|
||||
ejabberd_config:get_local_option({domain_balancing,
|
||||
LDstDomain}, fun(D) when is_atom(D) -> D end)
|
||||
ejabberd_config:get_option({domain_balancing,
|
||||
LDstDomain}, fun(D) when is_atom(D) -> D end)
|
||||
of
|
||||
undefined -> p1_time_compat:monotonic_time();
|
||||
random -> p1_time_compat:monotonic_time();
|
||||
@ -408,7 +408,13 @@ update_tables() ->
|
||||
false -> ok
|
||||
end.
|
||||
|
||||
|
||||
opt_type(domain_balancing) ->
|
||||
fun (random) -> random;
|
||||
(source) -> source;
|
||||
(destination) -> destination;
|
||||
(bare_source) -> bare_source;
|
||||
(bare_destination) -> bare_destination
|
||||
end;
|
||||
opt_type(domain_balancing_component_number) ->
|
||||
fun (N) when is_integer(N), N > 1 -> N end;
|
||||
opt_type(_) -> [domain_balancing_component_number].
|
||||
opt_type(_) -> [domain_balancing, domain_balancing_component_number].
|
||||
|
Loading…
Reference in New Issue
Block a user