fix(message validation): apply config CRUD operations on whole cluster
Fixes https://emqx.atlassian.net/browse/EMQX-12298
This commit is contained in:
parent
93e31d088a
commit
06f16d4ee0
|
@ -81,7 +81,7 @@ list() ->
|
||||||
-spec reorder([validation_name()]) ->
|
-spec reorder([validation_name()]) ->
|
||||||
{ok, _} | {error, _}.
|
{ok, _} | {error, _}.
|
||||||
reorder(Order) ->
|
reorder(Order) ->
|
||||||
emqx:update_config(
|
emqx_conf:update(
|
||||||
?VALIDATIONS_CONF_PATH,
|
?VALIDATIONS_CONF_PATH,
|
||||||
{reorder, Order},
|
{reorder, Order},
|
||||||
#{override_to => cluster}
|
#{override_to => cluster}
|
||||||
|
@ -95,7 +95,7 @@ lookup(Name) ->
|
||||||
-spec insert(validation()) ->
|
-spec insert(validation()) ->
|
||||||
{ok, _} | {error, _}.
|
{ok, _} | {error, _}.
|
||||||
insert(Validation) ->
|
insert(Validation) ->
|
||||||
emqx:update_config(
|
emqx_conf:update(
|
||||||
?VALIDATIONS_CONF_PATH,
|
?VALIDATIONS_CONF_PATH,
|
||||||
{append, Validation},
|
{append, Validation},
|
||||||
#{override_to => cluster}
|
#{override_to => cluster}
|
||||||
|
@ -104,7 +104,7 @@ insert(Validation) ->
|
||||||
-spec update(validation()) ->
|
-spec update(validation()) ->
|
||||||
{ok, _} | {error, _}.
|
{ok, _} | {error, _}.
|
||||||
update(Validation) ->
|
update(Validation) ->
|
||||||
emqx:update_config(
|
emqx_conf:update(
|
||||||
?VALIDATIONS_CONF_PATH,
|
?VALIDATIONS_CONF_PATH,
|
||||||
{update, Validation},
|
{update, Validation},
|
||||||
#{override_to => cluster}
|
#{override_to => cluster}
|
||||||
|
@ -113,7 +113,7 @@ update(Validation) ->
|
||||||
-spec delete(validation_name()) ->
|
-spec delete(validation_name()) ->
|
||||||
{ok, _} | {error, _}.
|
{ok, _} | {error, _}.
|
||||||
delete(Name) ->
|
delete(Name) ->
|
||||||
emqx:update_config(
|
emqx_conf:update(
|
||||||
?VALIDATIONS_CONF_PATH,
|
?VALIDATIONS_CONF_PATH,
|
||||||
{delete, Name},
|
{delete, Name},
|
||||||
#{override_to => cluster}
|
#{override_to => cluster}
|
||||||
|
|
Loading…
Reference in New Issue