The context of a shard placed on this node, given to the application's
shard children and to functions run with call/3.
:cluster- the cluster module.:n- the shard number,0..shards - 1.:db- the openSlap.SlateDBhandle. Read and write through it directly.:registry- the cluster'sRegistry. Name per-shard processes with the cluster'svia/2, which scopes names to{n, name}.:generation- the strategy's lease generation, ornil(Local).:child_options- application settings passed to shard children.
:status and :shard_db are internal coordination fields. Use
Slap.Cluster.shard_status/1 to inspect the shard's state.
A context is only valid while the shard is open on this node. When the
shard stops, Slap.Cluster.shard_status/1 says why.
Summary
Types
@type t() :: %Slap.Cluster.Shard{ child_options: keyword(), cluster: module(), db: Slap.SlateDB.t(), generation: non_neg_integer() | nil, n: non_neg_integer(), registry: atom(), shard_db: pid(), status: :atomics.atomics_ref() }