Documentation ¶
Overview ¶
Package consensus implements a simplified version of Paxos consensus protocol.
Index ¶
Constants ¶
View Source
const CHANNEL_DEFAULT_BUFFER_SIZE = 20
Variables ¶
This section is empty.
Functions ¶
func GetConsensusResultChan ¶
Types ¶
type ConsensusRequest ¶
type ConsensusRequest int
-------- REQUESTS -----------
func (*ConsensusRequest) Accept ¶
func (r *ConsensusRequest) Accept(arg Proposal, reply *Proposal) error
Accept Request
func (*ConsensusRequest) Learn ¶
func (r *ConsensusRequest) Learn(arg Proposal, reply *struct{}) error
Learn Request
type OldProposalNumberError ¶
type OldProposalNumberError struct{}
------- ERRORS -----------
func (OldProposalNumberError) Error ¶
func (e OldProposalNumberError) Error() string
Click to show internal directories.
Click to hide internal directories.