m2paxos

package
v0.0.0-...-6823d0b Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Q1

func Q1(q *paxi.Quorum) bool

func Q2

func Q2(q *paxi.Quorum) bool

Types

type Accept

type Accept struct {
	Key paxi.Key
	paxos.P2a
}

Accept phase 2a

func (Accept) String

func (a Accept) String() string

type Accepted

type Accepted struct {
	Key paxi.Key
	paxos.P2b
}

Accepted phase 2b

func (Accepted) String

func (a Accepted) String() string

type Commit

type Commit struct {
	Key paxi.Key
	paxos.P3
}

Commit phase 3

func (Commit) String

func (c Commit) String() string

type LeaderChange

type LeaderChange struct {
	Key    paxi.Key
	To     paxi.ID
	From   paxi.ID
	Ballot paxi.Ballot
}

LeaderChange switch leader

func (LeaderChange) String

func (l LeaderChange) String() string

type Prepare

type Prepare struct {
	Key paxi.Key
	paxos.P1a
}

Prepare phase 1a

func (Prepare) String

func (p Prepare) String() string

type Promise

type Promise struct {
	Key paxi.Key
	paxos.P1b
}

Promise phase 1b

func (Promise) String

func (p Promise) String() string

type Replica

type Replica struct {
	paxi.Node
	// contains filtered or unexported fields
}

Replica is WPaxos replica node

func NewReplica

func NewReplica(id paxi.ID) *Replica

NewReplica create new Replica instance

Jump to

Keyboard shortcuts

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