Shardex.Shard (shardex v0.1.0)

Copy Markdown View Source

A shard: a routing target with one pool per role (:primary, :replica, ...).

status is :active (routable), :drain (not routable, pools running) or :stopped (not routable, pools stopped).

Summary

Types

status()

@type status() :: :active | :drain | :stopped

t()

@type t() :: %Shardex.Shard{
  meta: map(),
  name: atom(),
  roles: %{required(atom()) => Shardex.Pool.t()},
  status: status()
}