hydrofoil

package
v0.0.0-...-ef9f1ab Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Broadcasting uint8 = 0
	StageOne           = 1
	StageTwo           = 2
	NotRunning         = 3
)
View Source
const (
	Vote0             uint8 = 0
	Vote1                   = 1
	VoteQuestionMark        = 2
	VoteUninitialized       = 3
)
View Source
const (
	LessUpToDate    uint8 = 0
	EquallyUpToDate       = 1
	MoreUpToDate          = 2
)

Variables

View Source
var CLIENTID uint32 = 0

Functions

This section is empty.

Types

type BenOrBroadcast

type BenOrBroadcast = hydrofoilproto.BenOrBroadcast

type BenOrBroadcastMsg

type BenOrBroadcastMsg interface {
	RPC
	GetBenOrMsgValid() uint8
	GetIteration() int32
	GetBroadcastEntry() Entry
	GetStartIndex() int32
	GetEntries() []Entry
	GetPQEntries() []Entry
}

type BenOrBroadcastReply

type BenOrBroadcastReply = hydrofoilproto.BenOrBroadcastReply

type BenOrConsensus

type BenOrConsensus = hydrofoilproto.BenOrConsensus

type BenOrConsensusMsg

type BenOrConsensusMsg interface {
	RPC
	GetBenOrMsgValid() uint8
	GetIteration() int32
	GetPhase() int32
	GetStage() uint8
	GetVote() uint8
	GetPrevPhaseFinalValue() uint8
	GetHaveMajEntry() uint8
	GetMajEntry() Entry
	GetStartIndex() int32
	GetEntries() []Entry
	GetPQEntries() []Entry
}

type BenOrConsensusReply

type BenOrConsensusReply = hydrofoilproto.BenOrConsensusReply

type BenOrState

type BenOrState struct {
	// contains filtered or unexported fields
}

type CandidateState

type CandidateState struct {
	// contains filtered or unexported fields
}

type ClientReqStatus

type ClientReqStatus struct {
	// contains filtered or unexported fields
}

type Entry

type Entry = hydrofoilproto.Entry

type ExtendedPriorityQueue

type ExtendedPriorityQueue struct {
	// contains filtered or unexported fields
}

type GetCommittedData

type GetCommittedData = hydrofoilproto.GetCommittedData

type GetCommittedDataReply

type GetCommittedDataReply = hydrofoilproto.GetCommittedDataReply

type Instance

type Instance struct {
	// contains filtered or unexported fields
}

type Item

type Item struct {
	// contains filtered or unexported fields
}

An Item is something we manage in a priority queue.

type LeaderState

type LeaderState struct {
	// contains filtered or unexported fields
}

type PriorityQueue

type PriorityQueue []*Item

A PriorityQueue implements heap.Interface and holds Items.

func (PriorityQueue) Len

func (pq PriorityQueue) Len() int

func (PriorityQueue) Less

func (pq PriorityQueue) Less(i, j int) bool

func (*PriorityQueue) Pop

func (pq *PriorityQueue) Pop() any

func (*PriorityQueue) Push

func (pq *PriorityQueue) Push(x any)

func (PriorityQueue) Swap

func (pq PriorityQueue) Swap(i, j int)

type RPC

type RPC interface {
	GetSenderId() int32
	GetTerm() int32
	GetCommitIndex() int32
	GetLeaderTerm() int32
	GetLogLength() int32
}

type Replica

type Replica struct {
	*genericsmr.Replica // extends a generic Paxos replica
	// contains filtered or unexported fields
}

func NewReplica

func NewReplica(id int, peerAddrList []string, thrifty bool, exec bool, dreply bool, durable bool) *Replica

Entry point

func NewReplicaBenOr

func NewReplicaBenOr(id int, peerAddrList []string, thrifty bool, exec bool, dreply bool, durable bool) *Replica

func NewReplicaRaft

func NewReplicaRaft(id int, peerAddrList []string, thrifty bool, exec bool, dreply bool, durable bool) *Replica

type ReplicateEntries

type ReplicateEntries = hydrofoilproto.ReplicateEntries

type ReplicateEntriesReply

type ReplicateEntriesReply = hydrofoilproto.ReplicateEntriesReply

type ReplyMsg

type ReplyMsg interface {
	UpdateMsg
	GetPQEntries() []Entry
}

type RequestVote

type RequestVote = hydrofoilproto.RequestVote

type RequestVoteReply

type RequestVoteReply = hydrofoilproto.RequestVoteReply

type ServerTimer

type ServerTimer struct {
	// contains filtered or unexported fields
}

type Set

type Set struct {
	// contains filtered or unexported fields
}

type UniqueCommand

type UniqueCommand struct {
	// contains filtered or unexported fields
}

type UpdateMsg

type UpdateMsg interface {
	RPC
	GetStartIndex() int32
	GetEntries() []Entry
}

Jump to

Keyboard shortcuts

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