Skip to content
6 changes: 4 additions & 2 deletions src/riak_kv_app.erl
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ start(_Type, _StartArgs) ->
riak_core_capability:register({riak_kv, put_soft_limit},
[true, false],
false),

riak_core_capability:register({riak_kv, tictacaae_prompted_repairs},
[true, false],
false),
Expand All @@ -252,11 +252,13 @@ start(_Type, _StartArgs) ->
mapreduce, index, get_preflist]}
]
++ [{health_check, {?MODULE, check_kv_health, []}} || HealthCheckOn]

++ WorkerPools),

ok = riak_api_pb_service:register(?SERVICES),

ok = riak_kv_cli_registry:register_cli(),

%% Add routes to webmachine
[ webmachine_router:add_route(R)
|| R <- lists:reverse(riak_kv_web:dispatch_table()) ],
Expand Down
32 changes: 32 additions & 0 deletions src/riak_kv_cli_registry.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
%% -------------------------------------------------------------------
%%
%% Copyright (c) 2025 TI Tokyo. All Rights Reserved.
%%
%% This file is provided to you under the Apache License,
%% Version 2.0 (the "License"); you may not use this file
%% except in compliance with the License. You may obtain
%% a copy of the License at
%%
%% http://www.apache.org/licenses/LICENSE-2.0
%%
%% Unless required by applicable law or agreed to in writing,
%% software distributed under the License is distributed on an
%% "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
%% KIND, either express or implied. See the License for the
%% specific language governing permissions and limitations
%% under the License.
%%
%% -------------------------------------------------------------------

-module(riak_kv_cli_registry).

-define(CLI_MODULES, [riak_kv_tictacaae_cli]).

-export([register_cli/0
]).

-spec register_cli() -> ok.
register_cli() ->
clique:register(?CLI_MODULES).

%% schemas loaded in riak_core
12 changes: 11 additions & 1 deletion src/riak_kv_console.erl
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@
bucket_type_create/1,
bucket_type_update/1,
bucket_type_reset/1,
bucket_type_list/1]).
bucket_type_list/1
]).

-export([command/1]). %% new callbacks go here, and are to be implemented using clique

-export([ensemble_status/1]).

Expand All @@ -56,6 +59,12 @@

-include_lib("kernel/include/logger.hrl").


-spec command([string()]) -> ok.
command(Cmd) ->
clique:run(Cmd).


join([NodeStr]) ->
join(NodeStr, fun riak_core:join/1,
"Sent join request to ~s~n", [NodeStr]).
Expand Down Expand Up @@ -747,6 +756,7 @@ ensemble_status([Str]) ->
riak_kv_ensemble_console:ensemble_detail(N)
end.


%%%===================================================================
%%% Private
%%%===================================================================
Expand Down
Loading
Loading