From 4bbd014d00b27b1b461b51c11f9860871c2e6944 Mon Sep 17 00:00:00 2001 From: Christopher Meiklejohn Date: Mon, 10 Jun 2013 11:06:25 -0700 Subject: [PATCH] Add documentation. --- src/riak_control.erl | 3 ++- src/riak_control_app.erl | 2 ++ src/riak_control_formatting.erl | 2 ++ src/riak_control_routes.erl | 2 ++ src/riak_control_security.erl | 3 ++- src/riak_control_session.erl | 3 +++ src/riak_control_sup.erl | 2 ++ src/riak_control_wm_cluster.erl | 13 +++---------- src/riak_control_wm_gui.erl | 2 ++ src/riak_control_wm_nodes.erl | 9 ++------- src/riak_control_wm_partitions.erl | 5 +++++ 11 files changed, 27 insertions(+), 19 deletions(-) diff --git a/src/riak_control.erl b/src/riak_control.erl index eb6315b..bf0dc82 100644 --- a/src/riak_control.erl +++ b/src/riak_control.erl @@ -17,8 +17,9 @@ %% under the License. %% %% ------------------------------------------------------------------- - +%% %% @doc Utilities needed by many pieces of the riak_control app. +%% -module(riak_control). -export([ diff --git a/src/riak_control_app.erl b/src/riak_control_app.erl index b313d7b..cc91831 100644 --- a/src/riak_control_app.erl +++ b/src/riak_control_app.erl @@ -17,6 +17,8 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Application. -module(riak_control_app). diff --git a/src/riak_control_formatting.erl b/src/riak_control_formatting.erl index c4ee5eb..0ad2f97 100644 --- a/src/riak_control_formatting.erl +++ b/src/riak_control_formatting.erl @@ -17,6 +17,8 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Helper functions for formatting. -module(riak_control_formatting). diff --git a/src/riak_control_routes.erl b/src/riak_control_routes.erl index 857cd68..2cc9033 100644 --- a/src/riak_control_routes.erl +++ b/src/riak_control_routes.erl @@ -17,6 +17,8 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Route helpers. -module(riak_control_routes). diff --git a/src/riak_control_security.erl b/src/riak_control_security.erl index b8e0bd4..06639dc 100644 --- a/src/riak_control_security.erl +++ b/src/riak_control_security.erl @@ -17,8 +17,9 @@ %% under the License. %% %% ------------------------------------------------------------------- - +%% %% @doc SSL and Authorization enforcement for administration URLs. + -module(riak_control_security). -export([scheme_is_available/2, diff --git a/src/riak_control_session.erl b/src/riak_control_session.erl index 4e3a89a..537ed00 100644 --- a/src/riak_control_session.erl +++ b/src/riak_control_session.erl @@ -17,6 +17,9 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Server responsible for tracking state of the Riak cluster and +%% refreshing state on a particular interval. -module(riak_control_session). diff --git a/src/riak_control_sup.erl b/src/riak_control_sup.erl index 36f5e39..9340360 100644 --- a/src/riak_control_sup.erl +++ b/src/riak_control_sup.erl @@ -17,6 +17,8 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Application supervisor. -module(riak_control_sup). diff --git a/src/riak_control_wm_cluster.erl b/src/riak_control_wm_cluster.erl index a78155c..4e75210 100644 --- a/src/riak_control_wm_cluster.erl +++ b/src/riak_control_wm_cluster.erl @@ -18,16 +18,9 @@ %% %% ------------------------------------------------------------------- %% -%% @doc -%% -%% Responsible for viewing, staging and committing changes to the -%% cluster. -%% -%% GET /cluster returns the current and staged clusters. -%% PUT /cluster updates the plan. -%% POST /cluster updates and commits the plan. -%% -%% @end +%% @doc Provides a resource for getting the current cluster status, +%% as well as a resource for updating the staged cluster plan, and +%% committing the staged cluster plan. -module(riak_control_wm_cluster). diff --git a/src/riak_control_wm_gui.erl b/src/riak_control_wm_gui.erl index 3aaa48c..d951aa1 100644 --- a/src/riak_control_wm_gui.erl +++ b/src/riak_control_wm_gui.erl @@ -17,6 +17,8 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Provides a resource for serving up the GUI skeleton. -module(riak_control_wm_gui). diff --git a/src/riak_control_wm_nodes.erl b/src/riak_control_wm_nodes.erl index 4c7e266..7664f5a 100644 --- a/src/riak_control_wm_nodes.erl +++ b/src/riak_control_wm_nodes.erl @@ -18,13 +18,8 @@ %% %% ------------------------------------------------------------------- %% -%% @doc -%% -%% Responsible for viewing and modifying nodes. -%% -%% GET /nodes returns the node list. -%% -%% @end +%% @doc Returns a list of all nodes, and information about their +%% membership in the cluster. -module(riak_control_wm_nodes). diff --git a/src/riak_control_wm_partitions.erl b/src/riak_control_wm_partitions.erl index bad7314..92aba6c 100644 --- a/src/riak_control_wm_partitions.erl +++ b/src/riak_control_wm_partitions.erl @@ -17,6 +17,11 @@ %% under the License. %% %% ------------------------------------------------------------------- +%% +%% @doc Returns a list of all partitions, how many primary replicas +%% are available, what the current n_val and quorum +%% configuration is, as well as the unavailable nodes for +%% each partition. -module(riak_control_wm_partitions).