package
0.0.0-20180331215552-6e7a5f847e26
Repository: https://github.com/peterbourgon/caspaxos.git
Documentation: pkg.go.dev
# Functions
GarbageCollect removes a key as described in section 3.1 "How to delete a record" in the paper.
GrowCluster adds the target acceptor to the cluster of proposers.
IsRetryable indicates the error, received from the GarbageCollect function, is non-terminal, and the client can retry the operation.
NewMemoryAcceptor returns a usable in-memory acceptor.
NewMemoryProposer returns a usable proposer uniquely identified by id.
ShrinkCluster removes the target acceptor from the cluster of proposers.
# Variables
ErrAcceptFailed indicates a failure during the first "accept" phase.
ErrDuplicate indicates the same acceptor was added twice.
ErrNotEqual indicates the tombstone value sent as part of a delete request doesn't correspond to the stored value we have for that key.
ErrNotFound indicates an attempt to remove a non-present acceptor.
ErrPrepareFailed indicates a failure during the first "prepare" phase.
# Structs
Age of a proposer, incremented by GC process.
AgeError is returned by acceptors when there's an age conflict.
Ballot models a ballot number, which are maintained by proposers and cached by acceptors.
ConflictError is returned by acceptors when there's a ballot conflict.
MemoryAcceptor persists data in-memory.
MemoryProposer (from the paper) "performs the initialization by communicating with acceptors, and keep minimal state needed to generate unique increasing update IDs (ballot numbers).".
Tombstone represents the terminal form of a key.
# Interfaces
Accepter models the second-phase responsibilities of an acceptor.
Acceptor models a complete, uniquely-addressable acceptor.
AcceptorLister allows operators to introspect the state of proposers.
Addresser models something with a unique address.
ConfigurationChanger models the grow/shrink cluster responsibilities of a proposer.
FastForwarder models the garbage collection responsibilities of a proposer.
Preparer models the first-phase responsibilities of an acceptor.
Proposer models a concrete proposer.
RejectRemover models the garbage collection responsibilities of an acceptor.
StateWatcher watches a key, yielding states on a user-supplied channel.
# Type aliases
ChangeFunc models client change proposals.