Module cartridge.lua-api.get-topology | Tarantool
Документация на русском языке
поддерживается сообществом
Tarantool Cartridge Table of contents Module cartridge.lua-api.get-topology

Module cartridge.lua-api.get-topology

Administration functions ( get-topology implementation).

Replicaset general information.

Fields:

  • uuid: (string) The replicaset UUID.
  • roles: ({string,…}) Roles enabled on the replicaset.
  • status: (string) Replicaset health.
  • master: (ServerInfo) Replicaset leader according to configuration.
  • active_master: (ServerInfo) Active leader.
  • weight: (number) Vshard replicaset weight.Matters only if vshard-storage role is enabled.
  • rebalancer: (boolean) Is rebalancer enabled on this replicaset.Matters only if vshard-storage role is enabled.
  • vshard_group: (string) Name of vshard group the replicaset belongs to.
  • all_rw: (boolean) A flag indicating that all servers in the replicaset should be read-write.
  • alias: (string) Human-readable replicaset name.
  • servers: ({ServerInfo,…}) Circular reference to all instances in the replicaset.

Instance general information.

Fields:

  • alias: (string) Human-readable instance name.
  • uri: (string)
  • uuid: (string)
  • disabled: (boolean)
  • electable: (boolean)
  • rebalancer: (boolean)
  • status: (string) Instance health.
  • message: (string) Auxilary health status.
  • replicaset: (ReplicasetInfo) Circular reference to a replicaset.
  • priority: (number) Leadership priority for automatic failover.
  • clock_delta: (number) Difference between remote clock and the current one (inseconds), obtained from the membership module (SWIM protocol).Positive values mean remote clock are ahead of local, and viceversa.
  • zone: (string)

Get servers and replicasets lists.

Returns:

({servers={ServerInfo,…},replicasets={ReplicasetInfo,…}})

Or

(nil)

(table) Error description

Get servers list.

Parameters:

  • filter: (optional function) function(x: ServerInfo) -> boolean

Returns:

table {ServerInfo, …}

Get servers uri list.

Parameters:

  • filter: (optional function) function(x: ServerInfo) -> boolean

Returns:

table {uri1, uri2, …}

Нашли ответ на свой вопрос?
Обратная связь