quorum

package
v0.0.0-...-5782b8f Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CountingQuorumTally

type CountingQuorumTally struct {
	ResponseHolder
	Threshold int
	Can       []int32
}

func (*CountingQuorumTally) Acknowledged

func (qrm *CountingQuorumTally) Acknowledged(aid int32) bool

func (*CountingQuorumTally) Add

func (qrm *CountingQuorumTally) Add(aid int32)

func (*CountingQuorumTally) CanFormQuorum

func (qrm *CountingQuorumTally) CanFormQuorum(aid int32) bool

func (*CountingQuorumTally) Reached

func (qrm *CountingQuorumTally) Reached() bool

type QuorumTally

type QuorumTally interface {
	Add(id int32)
	Reached() bool
	Acknowledged(int32) bool
	CanFormQuorum(int32) bool
}

type ResponseHolder

type ResponseHolder struct {
	Nacks map[int32]struct{}
	Acks  map[int32]struct{}
}

func GetResponseHolder

func GetResponseHolder() ResponseHolder

type SpecificQuorumTally

type SpecificQuorumTally struct {
	ResponseHolder
	Qrms [][]int32
	Can  []int32
}

func (*SpecificQuorumTally) Acknowledged

func (qrm *SpecificQuorumTally) Acknowledged(aid int32) bool

func (*SpecificQuorumTally) Add

func (qrm *SpecificQuorumTally) Add(id int32)

func (*SpecificQuorumTally) CanFormQuorum

func (qrm *SpecificQuorumTally) CanFormQuorum(aid int32) bool

func (*SpecificQuorumTally) Reached

func (qrm *SpecificQuorumTally) Reached() bool

Jump to

Keyboard shortcuts

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