Skip to content

Commit

Permalink
khepri: Add spec & doc to info/{0,1}
Browse files Browse the repository at this point in the history
  • Loading branch information
dumbbell committed Apr 11, 2022
1 parent 06e6d83 commit fcfe507
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/khepri.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1820,6 +1820,9 @@ sproc_payload(#standalone_fun{} = Fun) ->
%% Public helpers.
%% -------------------------------------------------------------------

-spec info() -> ok.
%% @doc Lists the running stores on <em>stdout</em>.

info() ->
StoreIds = get_store_ids(),
case StoreIds of
Expand All @@ -1831,9 +1834,14 @@ info() ->
fun(StoreId) ->
io:format(" ~ts~n", [StoreId])
end, StoreIds)
end.
end,
ok.

-spec info(store_id()) -> ok.
-spec info(StoreId) -> ok when
StoreId :: store_id().
%% @doc Lists the content of specified store on <em>stdout</em>.
%%
%% @param StoreID the name of the Ra cluster.

info(StoreId) ->
io:format("~n\033[1;32m== CLUSTER MEMBERS ==\033[0m~n~n", []),
Expand Down Expand Up @@ -1870,4 +1878,5 @@ info(StoreId) ->
khepri_utils:display_tree(Tree);
_ ->
ok
end.
end,
ok.

0 comments on commit fcfe507

Please sign in to comment.