Documentation
¶
Index ¶
- type Config
- type MockSync
- func (*MockSync) ClockOffset() (time.Duration, error)
- func (*MockSync) IsClockOutOfSync() bool
- func (*MockSync) Moniker() string
- func (m *MockSync) PeerSet() *peerset.PeerSet
- func (m *MockSync) SelfID() peer.ID
- func (m *MockSync) Services() service.Services
- func (*MockSync) Start() error
- func (*MockSync) Stop()
- type Synchronizer
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"`
SessionTimeoutStr string `toml:"session_timeout"`
Firewall *firewall.Config `toml:"firewall"`
// Private configs
MaxSessions int `toml:"-"`
BlockPerSession uint32 `toml:"-"`
BlockPerMessage uint32 `toml:"-"`
PruneWindow uint32 `toml:"-"`
LatestSupportingVer version.Version `toml:"-"`
Services service.Services `toml:"-"`
}
Config defines parameters for the sync module.
func DefaultConfig ¶
func DefaultConfig() *Config
func (*Config) BasicCheck ¶ added in v0.15.0
BasicCheck performs basic checks on the configuration.
func (*Config) SessionTimeout ¶
type MockSync ¶
MockSync is a mock implementation of the Synchronizer interface for testing.
func MockingSync ¶
func (*MockSync) ClockOffset ¶ added in v1.3.0
func (*MockSync) IsClockOutOfSync ¶ added in v1.3.0
type Synchronizer ¶
type Synchronizer interface {
Start() error
Stop()
Moniker() string
SelfID() peer.ID
PeerSet() *peerset.PeerSet
Services() service.Services
ClockOffset() (time.Duration, error)
IsClockOutOfSync() bool
}
func NewSynchronizer ¶
func NewSynchronizer( ctx context.Context, conf *Config, valKeys []*bls.ValidatorKey, state state.Facade, consV1Mgr consmgr.Manager, consV2Mgr consmgr.Manager, network network.Network, broadcastPipe pipeline.Pipeline[message.Message], networkPipe pipeline.Pipeline[network.Event], ) (Synchronizer, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.