kpaxos

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

This section is empty.

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 KPaxos replica with Paxos instance for each key

func NewReplica

func NewReplica(id paxi.ID) *Replica

func (*Replica) Broadcast

func (r *Replica) Broadcast(msg interface{})

Broadcast overrides Socket interface in Node

func (*Replica) Send

func (r *Replica) Send(to paxi.ID, msg interface{})

Send overrides Socket interface in Node

Jump to

Keyboard shortcuts

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