Versions in this module Expand all Collapse all v1 v1.13.7 Jul 18, 2025 v1.13.6 Jul 18, 2025 v1.13.5 Jul 18, 2025 v1.13.4 Jul 18, 2025 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 interface + Add func(newChoice ids.ID) + Finalized func() bool + Preference func() ids.ID + RecordPoll func(votes bag.Bag[ids.ID]) bool + RecordUnsuccessfulPoll func() + func NewFlat(factory Factory, params Parameters, choice ids.ID) Consensus + func NewTree(factory Factory, params Parameters, choice ids.ID) Consensus + type Factory interface + NewNnary func(params Parameters, choice ids.ID) Nnary + NewUnary func(params Parameters) Unary + var SnowballFactory Factory = snowballFactory{} + var SnowflakeFactory Factory = snowflakeFactory{} + type Flat struct + func (f *Flat) RecordPoll(votes bag.Bag[ids.ID]) bool + 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 struct + Alpha *int + AlphaConfidence int + AlphaPreference int + Beta int + ConcurrentRepolls int + K int + MaxItemProcessingTime time.Duration + MaxOutstandingItems int + OptimalProcessing int + func (p Parameters) MinPercentConnectedHealthy() float64 + func (p Parameters) Verify() error + type Tree struct + func (t *Tree) Add(choice ids.ID) + func (t *Tree) RecordPoll(votes bag.Bag[ids.ID]) bool + func (t *Tree) RecordUnsuccessfulPoll() + func (t *Tree) String() string + type Unary interface + Clone func() Unary + Extend func(originalPreference int) Binary + Finalized func() bool + RecordPoll func(count int) + RecordUnsuccessfulPoll func()