Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions deps/rabbitmq_auth_backend_cache/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ endef
DEPS = rabbit_common rabbit
TEST_DEPS = rabbitmq_ct_helpers rabbitmq_ct_client_helpers

PLT_APPS += rabbitmqctl

DEP_EARLY_PLUGINS = rabbit_common/mk/rabbitmq-early-plugin.mk
DEP_PLUGINS = rabbit_common/mk/rabbitmq-plugin.mk

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
%% This Source Code Form is subject to the terms of the Mozilla Public
%% License, v. 2.0. If a copy of the MPL was not distributed with this
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
%%
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
%%

-module('Elixir.RabbitMQ.CLI.Ctl.Commands.ClearAuthBackendCacheCommand').

-behaviour('Elixir.RabbitMQ.CLI.CommandBehaviour').

-export([
usage/0,
usage_additional/0,
usage_doc_guides/0,
flags/0,
validate/2,
merge_defaults/2,
banner/2,
run/2,
switches/0,
aliases/0,
output/2,
scopes/0,
formatter/0,
help_section/0,
description/0
]).


%%----------------------------------------------------------------------------
%% Callbacks
%%----------------------------------------------------------------------------
scopes() ->
[vmware, ctl].

switches() ->
[].

usage() ->
<<"clear_auth_backend_cache">>.

usage_additional() ->
[].

usage_doc_guides() ->
[].

help_section() ->
{plugin, rabbitmq_auth_backend_cache}.

description() ->
<<"Clears rabbitmq_auth_backend_cache plugin's cache on the target node">>.

flags() ->
[].

validate(_, _) ->
ok.

formatter() ->
'Elixir.RabbitMQ.CLI.Formatters.Table'.

merge_defaults(A, O) ->
{A, O}.

banner(_, _) ->
<<"Will clear rabbitmq_auth_backend_cache plugin's cache on the target node...">>.

run(_Args, #{node := Node}) ->
case rabbit_misc:rpc_call(Node, rabbit_auth_backend_cache, clear_cache_cluster_wide, []) of
{badrpc, _} = Error ->
Error;
Deleted ->
Deleted
end.

aliases() ->
[].

output(Value, _Opts) ->
'Elixir.RabbitMQ.CLI.DefaultOutput':output(Value).