View Source cets_status (cets v0.2.0)

Status of all tables.

Link to this section Summary

Types

Discovery process name (atom).
Mapping from a node name to tab_nodes_map.
Intermediate status information.
Mapping from a table name to a node list.
Table name (atom).

Functions

Formats gathered data.

Collects status information.
Collects and analyses status information.

Link to this section Types

-type disco_name() :: atom().
Discovery process name (atom).
-type info() ::
    #{available_nodes := [node()],
      unavailable_nodes := [node()],
      joined_nodes := [node()],
      discovered_nodes := [node()],
      discovery_works := boolean(),
      remote_nodes_without_disco := [node()],
      remote_nodes_with_unknown_tables := [node()],
      remote_unknown_tables := [table_name()],
      remote_nodes_with_missing_tables => [node()],
      remote_missing_tables := [table_name()],
      conflict_nodes := [node()],
      conflict_tables := [table_name()]}.
Link to this type

node_to_tab_nodes_map/0

View Source
-type node_to_tab_nodes_map() :: #{node() => tab_nodes_map()}.
Mapping from a node name to tab_nodes_map.
-type status_data() ::
    #{this_node := node(),
      online_nodes := [node()],
      system_info := cets_discovery:system_info(),
      available_nodes := [node()],
      local_table_to_other_nodes_map := tab_nodes_map(),
      node_to_tab_nodes_map := node_to_tab_nodes_map()}.
Intermediate status information.
-type tab_nodes_map() :: #{Table :: atom() => Nodes :: ordsets:ordset(node())}.
Mapping from a table name to a node list.
-type table_name() :: cets:table_name().
Table name (atom).

Link to this section Functions

-spec format_data(status_data()) -> info().

Formats gathered data.

Contains pure functions logic.
-spec gather_data(disco_name()) -> status_data().
Collects status information.
Link to this function

get_local_table_to_other_nodes_map_from_disco(Disco)

View Source
-spec get_local_table_to_other_nodes_map_from_disco(disco_name()) -> tab_nodes_map().
-spec status(disco_name()) -> info().
Collects and analyses status information.