Packages

Aerospike driver for Elixir with an OTP-native cluster runtime

Current section

Files

Jump to
aerospike_driver lib aerospike tables.ex
Raw

lib/aerospike/tables.ex

defmodule Aerospike.Tables do
@moduledoc false
# Canonical ETS table name helpers for one named connection.
# All cluster state lives in these four tables, owned by TableOwner.
# {node_name, row} — `row` is `t:Aerospike.Cluster.node_row/0` (see `insert_node_registry/5`).
@doc false
def nodes(name) when is_atom(name), do: :"#{name}_nodes"
# {{namespace, partition_id, replica_index}, node_name}
@doc false
def partitions(name) when is_atom(name), do: :"#{name}_partitions"
# Transaction tracking (future use).
@doc false
def txn_tracking(name) when is_atom(name), do: :"#{name}_txn_tracking"
# Cluster metadata: policy_defaults, cluster_ready flag, etc.
@doc false
def meta(name) when is_atom(name), do: :"#{name}_meta"
# Per-node circuit breaker error counters.
@doc false
def breaker(name) when is_atom(name), do: :"#{name}_breaker"
# ETS key that the Router checks to confirm the cluster has completed initial tend.
@doc false
def ready_key, do: :cluster_ready
# Task.Supervisor for batch fan-out (isolates task crashes from callers).
@doc false
def task_sup(name) when is_atom(name), do: :"#{name}_task_sup"
end