Electiontrigger

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TIMEOUT_EXP_BASE = 2.0

Functions

This section is empty.

Types

type TimerBasedElectionTrigger

type TimerBasedElectionTrigger struct {
	// contains filtered or unexported fields
}

func NewTimerBasedElectionTrigger

func NewTimerBasedElectionTrigger(minTimeout time.Duration, callbackFromOrbs interfaces.OnElectionCallback) *TimerBasedElectionTrigger

func (*TimerBasedElectionTrigger) CalcTimeout

func (t *TimerBasedElectionTrigger) CalcTimeout(view primitives.View) time.Duration

func (*TimerBasedElectionTrigger) ElectionChannel

func (t *TimerBasedElectionTrigger) ElectionChannel() chan *interfaces.ElectionTrigger

func (*TimerBasedElectionTrigger) RegisterOnElection

func (t *TimerBasedElectionTrigger) RegisterOnElection(blockHeight primitives.BlockHeight, view primitives.View, moveToNextLeader func(blockHeight primitives.BlockHeight, view primitives.View, onElectionCB interfaces.OnElectionCallback))

on new view

func (*TimerBasedElectionTrigger) Stop

func (t *TimerBasedElectionTrigger) Stop()

Jump to

Keyboard shortcuts

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