messages

package
v0.0.0-...-7148df5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 3 Imported by: 0

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

func (AdoptedMessage) Src

func (bm AdoptedMessage) Src() v1.Addr

func (AdoptedMessage) String

func (bm AdoptedMessage) String() string

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 NewDecisionMessage(source v1.Addr, slot types.Slot, command types.Command) DecisionMessage

func (DecisionMessage) Src

func (bm DecisionMessage) Src() v1.Addr

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

func (Phase1aMessage) Src

func (bm Phase1aMessage) Src() v1.Addr

func (Phase1aMessage) String

func (bm Phase1aMessage) String() string

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

func (Phase1bMessage) Src

func (bm Phase1bMessage) Src() v1.Addr

func (Phase1bMessage) String

func (bm Phase1bMessage) String() string

type Phase2aMessage

type Phase2aMessage struct {
	PValue types.PValue
	// contains filtered or unexported fields
}

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

func (Phase2aMessage) Src

func (bm Phase2aMessage) Src() v1.Addr

func (Phase2aMessage) String

func (bm Phase2aMessage) String() string

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

func (Phase2bMessage) Src

func (bm Phase2bMessage) Src() v1.Addr

func (Phase2bMessage) String

func (bm Phase2bMessage) String() string

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

func (PreemptMessage) Src

func (bm PreemptMessage) Src() v1.Addr

func (PreemptMessage) String

func (bm PreemptMessage) String() string

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 NewProposedMessage(source v1.Addr, slot types.Slot, command types.Command) ProposeMessage

func (ProposeMessage) Src

func (bm ProposeMessage) Src() v1.Addr

func (ProposeMessage) String

func (pm ProposeMessage) String() string

type RequestMessage

type RequestMessage struct {
	Command types.Command
	// contains filtered or unexported fields
}

RequestMessage - Request from Client to all Replicas encapsulating a Command

func NewRequestMessage

func NewRequestMessage(source v1.Addr, command types.Command) RequestMessage

func (RequestMessage) Src

func (bm RequestMessage) Src() v1.Addr

func (RequestMessage) String

func (rm RequestMessage) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL