sync

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Moniker        string           `toml:"moniker"`
	SessionTimeout time.Duration    `toml:"session_timeout"`
	NodeNetwork    bool             `toml:"node_network"`
	Firewall       *firewall.Config `toml:"firewall"`

	// Private configs
	MaxSessions         int    `toml:"-"`
	LatestBlockInterval uint32 `toml:"-"`
	BlockPerMessage     uint32 `toml:"-"`
}

func DefaultConfig

func DefaultConfig() *Config

func (*Config) BasicCheck added in v0.15.0

func (conf *Config) BasicCheck() error

BasicCheck performs basic checks on the configuration.

func (*Config) CacheSize

func (conf *Config) CacheSize() int

func (*Config) Services added in v0.17.0

func (conf *Config) Services() service.Services

type MockSync

type MockSync struct {
	TestID       peer.ID
	TestPeerSet  *peerset.PeerSet
	TestServices service.Services
}

func MockingSync

func MockingSync(ts *testsuite.TestSuite) *MockSync

func (*MockSync) Moniker

func (m *MockSync) Moniker() string

func (*MockSync) PeerSet

func (m *MockSync) PeerSet() *peerset.PeerSet

func (*MockSync) SelfID

func (m *MockSync) SelfID() peer.ID

func (*MockSync) Services added in v0.19.0

func (m *MockSync) Services() service.Services

func (*MockSync) Start

func (m *MockSync) Start() error

func (*MockSync) Stop

func (m *MockSync) Stop()

type Synchronizer

type Synchronizer interface {
	Start() error
	Stop()
	Moniker() string
	SelfID() peer.ID
	PeerSet() *peerset.PeerSet
	Services() service.Services
}

func NewSynchronizer

func NewSynchronizer(
	conf *Config,
	valKeys []*bls.ValidatorKey,
	st state.Facade,
	consMgr consensus.Manager,
	net network.Network,
	broadcastCh <-chan message.Message,
) (Synchronizer, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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