Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdoptedMessage ¶
type AdoptedMessage struct {
BallotNumber types.BallotNumber
Accepted types.PValues
// contains filtered or unexported fields
}
Message sent by the Scout to the leader on a successful adoption of ballot by majority of the acceptors.
func NewAdoptedMessage ¶
func NewAdoptedMessage(addr v1.Addr, number types.BallotNumber, values types.PValues) AdoptedMessage
type DecisionMessage ¶
type DecisionMessage struct {
Slot types.Slot
Command types.Command
// contains filtered or unexported fields
}
DecisionMessage - Decision from the leader to the Replica with assigned slot for a command
func NewDecisionMessage ¶
func (DecisionMessage) String ¶
func (dm DecisionMessage) String() string
type Phase1aMessage ¶
type Phase1aMessage struct {
BallotNumber types.BallotNumber
// contains filtered or unexported fields
}
Message sent by the leader(Scout) to the acceptors containing the BallotNumber during the Phase1 of Paxos
func NewPhase1aMessage ¶
func NewPhase1aMessage(source v1.Addr, number types.BallotNumber) Phase1aMessage
type Phase1bMessage ¶
type Phase1bMessage struct {
BallotNumber types.BallotNumber
PValues types.PValues
// contains filtered or unexported fields
}
Message sent by the Acceptor in response to the Phase1aMessage containing the current BallotNumber and the list of accepted PValues
func NewPhase1bMessage ¶
func NewPhase1bMessage(source v1.Addr, number types.BallotNumber, values types.PValues) Phase1bMessage
type Phase2aMessage ¶
Message sent by the leader(Commander) to the acceptors containing the PValue (BallotNum, Slot, Command)
func NewPhase2aMessage ¶
func NewPhase2aMessage(source v1.Addr, value types.PValue) Phase2aMessage
type Phase2bMessage ¶
type Phase2bMessage struct {
BallotNumber types.BallotNumber
// contains filtered or unexported fields
}
Message returned by the Acceptor back to Commander as a response to the Phase2aMessage
func NewPhase2bMessage ¶
func NewPhase2bMessage(addr v1.Addr, number types.BallotNumber) Phase2bMessage
type PreemptMessage ¶
type PreemptMessage struct {
BallotNumber types.BallotNumber
// contains filtered or unexported fields
}
Message sent by the Scout or a Commander indicating that a ballot-number is pre-empted by a new ballot number
func NewPremptedMessage ¶
func NewPremptedMessage(addr v1.Addr, number types.BallotNumber) PreemptMessage
type ProposeMessage ¶
type ProposeMessage struct {
Slot types.Slot
Command types.Command
// contains filtered or unexported fields
}
ProposeMessage - Proposal from the replica to the leader containing a proposed (slot, command)
func NewProposedMessage ¶
func (ProposeMessage) String ¶
func (pm ProposeMessage) String() string
type RequestMessage ¶
RequestMessage - Request from Client to all Replicas encapsulating a Command
func NewRequestMessage ¶
func NewRequestMessage(source v1.Addr, command types.Command) RequestMessage
func (RequestMessage) String ¶
func (rm RequestMessage) String() string