# `PaxosKV.Proposer`

Implements the Proposer role in the Paxos consensus algorithm.

The Proposer initiates consensus rounds by proposing values to Acceptors. It
coordinates the two-phase protocol (prepare and accept phases) to reach
consensus on a value for a given key. When contention is detected, it falls
back to a primary proposer to ensure liveness.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `handle_call`

# `propose`

Asks the local Proposer to convince the cluster about a `value`.

When it detects that there are other Proposer(s) trying to do the same, and
the liveness property of Paxos is in danger, it falls back to a primary
proposer (running on a node that is determined by the key) instead of the
local service.

## Return values:

- `{:ok, value}`: the `value` is the chosen (consensus) value for the `key`
- `{:error, :no_quorum}`: there are't enough nodes participating in the cluster
- `{:error, :invalid_value}`: the `pid` or `node` provided in `opts` is not alive

# `start_link`

---

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