Class luchia.utilities

High-level utilities class.

Contains all high-level utility methods. This module should be used instead of the core modules when possible.

See the utilities.lua example for more detail.

Info:

  • Copyright: 2011-2015 Chad Phillips
  • Author: Chad Phillips

Local Functions

luchia.utilities.utilities_get_call(self, path) Make a utilities-related request to the server.

Methods

luchia.utilities:new(self, server_params) Create a new utilities handler object.
luchia.utilities:version() Get the database server version.
luchia.utilities:membership() Get the database node membership list.
luchia.utilities:get_default_cluster_node() Get the default cluster node.
luchia.utilities:config(node) Get the database server configuration.
luchia.utilities:stats(node) Get the database server statistics.
luchia.utilities:active_tasks() Get the database server active tasks.


Local Functions

Methods
luchia.utilities.utilities_get_call(self, path)
Make a utilities-related request to the server.

Parameters:

  • self
  • path Optional. The server path.

Returns:

    The following four values, in this order: responsedata, responsecode, headers, status_code.

Methods

luchia.utilities:new(self, server_params)
Create a new utilities handler object.

Parameters:

  • self
  • server_params Optional. A table of server connection parameters (identical to default.server in luchia.conf. If not provided, a server object will be generated from the default server configuration.

Returns:

    A utilities handler object.

Usage:

    util = luchia.utilities:new(server_params)
luchia.utilities:version()
Get the database server version.

Returns:

    The database server version string.

Usage:

    util:version()
luchia.utilities:membership()
Get the database node membership list.

Returns:

    Same values as utilities_get_call, response_data is a table of node membership information.

See also:

Usage:

    util:membership()
luchia.utilities:get_default_cluster_node()
Get the default cluster node.

Returns:

    The default cluster node.

Usage:

    util:get_default_cluster_node()
luchia.utilities:config(node)
Get the database server configuration.

Parameters:

Returns:

    Same values as utilities_get_call, response_data is a table of database server configuration information.

See also:

Usage:

    util:config()
luchia.utilities:stats(node)
Get the database server statistics.

Parameters:

Returns:

    Same values as utilities_get_call, response_data is a table of database server statistics information.

See also:

Usage:

    util:stats()
luchia.utilities:active_tasks()
Get the database server active tasks.

Returns:

    Same values as utilities_get_call, response_data is a list of database server active tasks.

See also:

Usage:

    util:active_tasks()
generated by LDoc 1.4.6 Last updated 2021-02-26 22:36:58