# `PaxosKV.Acceptor`

Implements the Acceptor role in the Paxos consensus algorithm.

The Acceptor responds to prepare and accept requests from Proposers. It
maintains the state of accepted proposals and enforces the protocol rules
that ensure safety (agreement on a single value per key).

# `accept`

Sends an accept request to Acceptors on the specified nodes.

This is the second phase of the Paxos protocol. The Acceptor will accept
the proposed value if it hasn't promised to reject it.

Returns a list of responses from the Acceptors.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `info`

Collects a list of accepted `{id, value}` pairs from the acceptors.

# `keys`

Returns a list of all keys stored across Acceptors on the specified nodes.

The results are flattened and deduplicated.

## Examples

    iex> PaxosKV.Acceptor.keys([:node1@localhost, :node2@localhost], PaxosKV)
    [:key1, :key2, :key3]

# `prepare`

Sends a prepare request to Acceptors on the specified nodes.

This is the first phase of the Paxos protocol. The Acceptor will promise
not to accept proposals with IDs lower than the given `id`.

Returns a list of responses from the Acceptors.

# `start_link`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
