Module cartridge.lua-api.failover
Administration functions (failover related).
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)
etcd2_params: (optional table) (added in v2.1.2-26)
Returns:
(boolean) true if config applied successfully
Or
(nil)
(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:
Returns:
(boolean) New failover state
Or
(nil)
(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: (optional string) Supported state providers are “tarantool” and “etcd2”.
tarantool_params: (added in v2.0.2-2)
etcd2_params: (added in v2.1.2-26)
endpoints: (optional table) URIs that are used to discover and to access etcd cluster instances.(default: {'http://localhost:2379', 'http://localhost:4001'}
)
username: (optional string) (default: “”)
password: (optional string) (default: “”)
lock_delay: (optional number) Timeout (in seconds), determines lock’s time-to-live (default: 10)