Documentation ¶
Index ¶
- type Manager
- func (m *Manager) GetNextElectionTime() time.Time
- func (m *Manager) PairValidatorsAndValidatableNodes() []*VWindow
- func (m *Manager) PushResult(vr *api.ValidationResult)
- func (m *Manager) ResetValidatorGroup(nodeIDs []string)
- func (m *Manager) Start(ctx context.Context)
- func (m *Manager) StartElection()
- func (m *Manager) Stop(ctx context.Context) error
- type VWindow
- type ValidatableGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager validation manager
func NewManager ¶
func NewManager(nodeMgr *node.Manager, assetMgr *assets.Manager, configFunc dtypes.GetSchedulerConfigFunc, p *pubsub.PubSub) *Manager
NewManager return new node manager instance
func (*Manager) GetNextElectionTime ¶
GetNextElectionTime Get the time of the next election
func (*Manager) PairValidatorsAndValidatableNodes ¶
PairValidatorsAndValidatableNodes randomly pair validators and validatable nodes based on their bandwidth capabilities.
func (*Manager) PushResult ¶ added in v0.1.10
func (m *Manager) PushResult(vr *api.ValidationResult)
PushResult push validation result info to queue
func (*Manager) ResetValidatorGroup ¶
ResetValidatorGroup clears and initializes the validator and validatable groups
func (*Manager) StartElection ¶
func (m *Manager) StartElection()
StartElection triggers an election manually.
type VWindow ¶
type VWindow struct { NodeID string // Node ID of the validation window. ValidatableNodes map[string]int64 }
VWindow represents a validation window that contains a validator id and validatable node list.
type ValidatableGroup ¶
type ValidatableGroup struct {
// contains filtered or unexported fields
}
ValidatableGroup Each ValidatableGroup will be paired with a VWindow
Click to show internal directories.
Click to hide internal directories.