Module cartridge.lua-api.failover

Administration functions (failover related).

Functions

get_params () Get failover configuration.
set_params (opts) Configure automatic failover.
get_failover_enabled () Get current failover state.
set_failover_enabled (enabled) Enable or disable automatic failover.
promote (replicaset_uuid) Promote leaders in replicasets.

Tables

FailoverParams Failover parameters.


Functions

get_params ()
Get failover configuration.

(Added in v2.0.2-2)

Returns:

    FailoverParams
set_params (opts)
Configure automatic failover.

(Added in v2.0.2-2)

Parameters:

  • opts
    • mode optional string
    • state_provider optional string
    • tarantool_params optional table

Returns:

    boolean true if config applied successfully

Or

  1. nil
  2. table Error description
get_failover_enabled ()
Get current failover state.

(Deprecated since v2.0.2-2)

set_failover_enabled (enabled)
Enable or disable automatic failover.

(Deprecated since v2.0.2-2)

Parameters:

  • enabled boolean

Returns:

    boolean New failover state

Or

  1. nil
  2. table Error description
promote (replicaset_uuid)
Promote leaders in replicasets.

Parameters:

  • replicaset_uuid table ] = leader_uuid }

Returns:

    boolean true On success

Or

  1. nil
  2. table Error description

Tables

FailoverParams
Failover parameters.

(Added in v2.0.2-2)

Fields:

  • mode string Supported modes are "disabled", "eventual" and "stateful"
  • state_provider nil or string Only "tarantool" is supported now
  • tarantool_params nil or table {uri = 'string', password = 'string'}
generated by LDoc 1.4.6 Last updated 2020-04-24 16:23:15