Module cartridge.rpc

Remote procedure calls between cluster instances.

Functions

call (role_name, fn_name[, args[, opts]]) Perform a remote procedure call.

Local Functions

get_candidates (role_name[, opts]) List instances suitable for performing a remote call.
get_connection (role_name[, opts]) Connect to an instance with an enabled role.


Functions

call (role_name, fn_name[, args[, opts]])
Perform a remote procedure call. Find a suitable healthy instance with an enabled role and perform a net.box conn:call on it.

Parameters:

  • role_name string
  • fn_name string
  • args table (optional)
  • opts
    • prefer_local optional boolean Don't perform a remote call if possible. (default: true)
    • leader_only optional boolean Perform a call only on the replica set leaders. (default: false)
    • remote_only (deprecated) Use prefer_local instead.
    • timeout passed to net.box conn:call options.
    • buffer passed to net.box conn:call options.

Returns:

    conn:call() result

Or

  1. nil
  2. table Error description

Local Functions

get_candidates (role_name[, opts])
List instances suitable for performing a remote call.

Parameters:

  • role_name string
  • opts
    • leader_only optional boolean

Returns:

    {string,...} URIs

Or

  1. nil
  2. table Error description
get_connection (role_name[, opts])
Connect to an instance with an enabled role.

Parameters:

  • role_name string
  • opts
    • prefer_local optional boolean
    • leader_only optional boolean

Returns:

    net.box connection

Or

  1. nil
  2. table Error description
generated by LDoc 1.4.6 Last updated 2019-08-29 23:56:02