Versions in this module Expand all Collapse all v1 v1.11.10 Jul 13, 2024 Changes in this version + const MinPercentConnectedBuffer + var DefaultParameters = Parameters + var ErrParametersInvalid = errors.New("parameters invalid") + type Binary interface + Finalized func() bool + Preference func() int + RecordPoll func(count, choice int) + RecordUnsuccessfulPoll func() type Consensus + func NewFlat(factory Factory, params Parameters, choice ids.ID) Consensus + func NewTree(factory Factory, params Parameters, choice ids.ID) Consensus type Factory + var SnowballFactory Factory = snowballFactory{} + var SnowflakeFactory Factory = snowflakeFactory{} + NewNnary func(params Parameters, choice ids.ID) Nnary + NewUnary func(params Parameters) Unary + type Nnary interface + Add func(newChoice ids.ID) + Finalized func() bool + Preference func() ids.ID + RecordPoll func(count int, choice ids.ID) + RecordUnsuccessfulPoll func() type Parameters + AlphaConfidence int + AlphaPreference int + Beta int + MaxItemProcessingTime time.Duration + MaxOutstandingItems int + OptimalProcessing int + func (p Parameters) MinPercentConnectedHealthy() float64 + func (p Parameters) Verify() error + type Unary interface + Clone func() Unary + Extend func(originalPreference int) Binary + Finalized func() bool + RecordPoll func(count int) + RecordUnsuccessfulPoll func() v0 v0.1.0 Apr 19, 2020 Changes in this version + type BinarySlush interface + Initialize func(initialPreference int) + Preference func() int + RecordSuccessfulPoll func(choice int) + type BinarySnowball interface + type BinarySnowflake interface + Finalized func() bool + Initialize func(beta, initialPreference int) + Preference func() int + RecordSuccessfulPoll func(choice int) + RecordUnsuccessfulPoll func() + type Byzantine struct + func (b *Byzantine) Add(choice ids.ID) + func (b *Byzantine) Finalized() bool + func (b *Byzantine) Initialize(params Parameters, choice ids.ID) + func (b *Byzantine) Parameters() Parameters + func (b *Byzantine) Preference() ids.ID + func (b *Byzantine) RecordPoll(votes ids.Bag) + func (b *Byzantine) RecordUnsuccessfulPoll() + func (b *Byzantine) String() string + type ByzantineFactory struct + func (ByzantineFactory) New() Consensus + type Consensus interface + Add func(newChoice ids.ID) + Finalized func() bool + Initialize func(params Parameters, initialPreference ids.ID) + Parameters func() Parameters + Preference func() ids.ID + RecordPoll func(votes ids.Bag) + RecordUnsuccessfulPoll func() + type Factory interface + New func() Consensus + type Flat struct + func (f *Flat) Initialize(params Parameters, choice ids.ID) + func (f *Flat) Parameters() Parameters + func (f *Flat) RecordPoll(votes ids.Bag) + func (sb *Flat) Preference() ids.ID + func (sb *Flat) RecordSuccessfulPoll(choice ids.ID) + func (sb *Flat) String() string + type FlatFactory struct + func (FlatFactory) New() Consensus + type NnarySlush interface + Initialize func(initialPreference ids.ID) + Preference func() ids.ID + RecordSuccessfulPoll func(choice ids.ID) + type NnarySnowball interface + type NnarySnowflake interface + Add func(newChoice ids.ID) + Finalized func() bool + Initialize func(betaVirtuous, betaRogue int, initialPreference ids.ID) + Preference func() ids.ID + RecordSuccessfulPoll func(choice ids.ID) + RecordUnsuccessfulPoll func() + type Parameters struct + Alpha int + BetaRogue int + BetaVirtuous int + ConcurrentRepolls int + K int + Metrics prometheus.Registerer + Namespace string + func (p Parameters) Valid() error + type Tree struct + func (t *Tree) Add(choice ids.ID) + func (t *Tree) Initialize(params Parameters, choice ids.ID) + func (t *Tree) Parameters() Parameters + func (t *Tree) RecordPoll(votes ids.Bag) + func (t *Tree) RecordUnsuccessfulPoll() + func (t *Tree) String() string + type TreeFactory struct + func (TreeFactory) New() Consensus + type UnarySnowball interface + Clone func() UnarySnowball + Extend func(beta, originalPreference int) BinarySnowball + Finalized func() bool + Initialize func(beta int) + RecordSuccessfulPoll func() + RecordUnsuccessfulPoll func() + type UnarySnowflake interface + Clone func() UnarySnowflake + Extend func(beta, originalPreference int) BinarySnowflake + Finalized func() bool + Initialize func(beta int) + RecordSuccessfulPoll func() + RecordUnsuccessfulPoll func()