RedisCluster.Cluster.NodeInfo (redis_cluster v0.8.0)

View Source

Summary

Types

t()

Struct containing the information about a single Redis node.

Functions

Struct holding info from the CLUSTER SHARDS or CLUSTER SLOTS commands.

Safely converts a health status string to an atom.

Converts the node info into a table format for display. May take a single node or a list of nodes. Returns iodata that can be printed directly or converted to a string.

Types

t()

@type t() :: %RedisCluster.Cluster.NodeInfo{
  health: :online | :loading | :failed | :unknown,
  host: String.t(),
  id: String.t(),
  port: non_neg_integer(),
  role: :master | :replica,
  slots: [RedisCluster.HashSlots.hash_slot()]
}

Struct containing the information about a single Redis node.

This struct is used for both the CLUSTER SHARDS and CLUSTER SLOTS commands. Also contains the health status of the node, if available.

Functions

%RedisCluster.Cluster.NodeInfo{}

(struct)

Struct holding info from the CLUSTER SHARDS or CLUSTER SLOTS commands.

health_atom(arg1)

Safely converts a health status string to an atom.

to_table(info)

Converts the node info into a table format for display. May take a single node or a list of nodes. Returns iodata that can be printed directly or converted to a string.