Versions in this module Expand all Collapse all v1 v1.21.0 Feb 1, 2024 Changes in this version + const SilentStateActiveBlocks + const SilentStateDelayBlocks + func DeduplicateMessagesPayloads[T any](payloads []T, keyFn func(T) string) []T + func ExtractMessagesPayloads[T any](state *BaseAsyncState, messageType string) []T + type AsyncMachine struct + func NewAsyncMachine(logger log.StandardLogger, ctx context.Context, channel net.BroadcastChannel, ...) *AsyncMachine + func (am *AsyncMachine) Execute() (AsyncState, error) + type AsyncState interface + CanTransition func() bool + Initiate func(ctx context.Context) error + MemberIndex func() group.MemberIndex + Next func() (AsyncState, error) + Receive func(msg net.Message) error + type BaseAsyncState struct + func NewBaseAsyncState() *BaseAsyncState + func (bas *BaseAsyncState) GetAllReceivedMessages(messageType string) []net.Message + func (bas *BaseAsyncState) ReceiveToHistory(msg net.Message) + type SyncMachine struct + func NewSyncMachine(logger log.StandardLogger, channel net.BroadcastChannel, ...) *SyncMachine + func (sm *SyncMachine) Execute(startBlockHeight uint64) (SyncState, uint64, error) + type SyncState interface + ActiveBlocks func() uint64 + DelayBlocks func() uint64 + Initiate func(ctx context.Context) error + MemberIndex func() group.MemberIndex + Next func() (SyncState, error) + Receive func(msg net.Message) error