Documentation
¶
Index ¶
- Constants
- type Client
- type CommandBallot
- type P1a
- type P1b
- type P2a
- type P2b
- type P3
- type Paxos
- func (p *Paxos) Ballot() paxi.Ballot
- func (p *Paxos) HandleP1a(m P1a)
- func (p *Paxos) HandleP1b(m P1b)
- func (p *Paxos) HandleP2a(m P2a)
- func (p *Paxos) HandleP2b(m P2b)
- func (p *Paxos) HandleP3(m P3)
- func (p *Paxos) HandleRequest(r paxi.Request)
- func (p *Paxos) IsLeader() bool
- func (p *Paxos) Leader() paxi.ID
- func (p *Paxos) P1a()
- func (p *Paxos) P2a(r *paxi.Request)
- func (p *Paxos) SetActive(active bool)
- func (p *Paxos) SetBallot(b paxi.Ballot)
- type Replica
Constants ¶
View Source
const ( HTTPHeaderSlot = "Slot" HTTPHeaderBallot = "Ballot" HTTPHeaderExecute = "Execute" HTTPHeaderInProgress = "Inprogress" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { *paxi.HTTPClient // contains filtered or unexported fields }
Client overwrites read operation for Paxos
type CommandBallot ¶
CommandBallot conbines each command with its ballot number
func (CommandBallot) String ¶
func (cb CommandBallot) String() string
type P1b ¶
type P1b struct { Ballot paxi.Ballot ID paxi.ID // from node id Log map[int]CommandBallot // uncommitted logs }
P1b promise message
type Paxos ¶
type Paxos struct { paxi.Node Q1 func(*paxi.Quorum) bool Q2 func(*paxi.Quorum) bool ReplyWhenCommit bool // contains filtered or unexported fields }
Paxos instance
func (*Paxos) HandleRequest ¶
HandleRequest handles request and start phase 1 or phase 2
Click to show internal directories.
Click to hide internal directories.