Module cartridge.confapplier

Configuration management primitives.

Implements the internal state machine which helps to manage cluster operation and protects from invalid state transitions.

Functions

get_readonly ([section_name]) Get a read-only view on the clusterwide configuration.
get_deepcopy ([section_name]) Get a read-write deep copy of the clusterwide configuration.

Local Functions

set_state (state[, err]) Perform state transition.
wish_state (state[, timeout]) Make a wish for meeting desired state.
validate_config (clusterwide_config_new) Validate configuration by all roles.
apply_config (clusterwide_config) Apply the role configuration.


Functions

get_readonly ([section_name])
Get a read-only view on the clusterwide configuration.

Returns either conf[section_name] or entire conf. Any attempt to modify the section or its children will raise an error.

Parameters:

  • section_name string (optional)

Returns:

    table
get_deepcopy ([section_name])
Get a read-write deep copy of the clusterwide configuration.

Returns either conf[section_name] or entire conf. Changing it has no effect unless it's used to patch clusterwide configuration.

Parameters:

  • section_name string (optional)

Returns:

    table

Local Functions

set_state (state[, err])
Perform state transition.

Parameters:

  • state string New state
  • err (optional)

Returns:

    nil
wish_state (state[, timeout])
Make a wish for meeting desired state.

Parameters:

  • state string Desired state.
  • timeout number (optional)

Returns:

    string Final state, may differ from desired.
validate_config (clusterwide_config_new)
Validate configuration by all roles.

Parameters:

  • clusterwide_config_new table

Returns:

    boolean true

Or

  1. nil
  2. table Error description
apply_config (clusterwide_config)
Apply the role configuration.

Parameters:

  • clusterwide_config table

Returns:

    boolean true

Or

  1. nil
  2. table Error description
generated by LDoc 1.4.6 Last updated 2020-04-24 16:23:15