Documentation
¶
Index ¶
- type DBFT2Context
- type DBFT2ContextService
- type DBFT2Machine
- func NewDBFT2Machine(faultyNodes int, numberOfMachines int, clock timing.Clock, me int, name string) (DBFT2Machine, error)
- func NewDBFT2MachineMachines(faultyNodes int, machines []machine.SingleTimerStateMachine, ...) (DBFT2Machine, error)
- func NewDefaultDBFT2Machine(faultyNodes int, numberOfMachines int, clock timing.Clock, me int, name string) (DBFT2Machine, error)
- type DBFT2MachineService
- func (d *DBFT2MachineService) AddScheduleEvent(countdown float64, machine int, name string, eventParams []string)
- func (d *DBFT2MachineService) AfterUpdateState(current single.State, param single.Param, updated bool) bool
- func (d *DBFT2MachineService) BeforeUpdateState(current single.State, param single.Param) bool
- func (d *DBFT2MachineService) BeforeUpdateStateMulti(current replicated.MultiState, param replicated.MultiContext) bool
- func (d *DBFT2MachineService) FillSimpleCycle(me int) error
- func (d *DBFT2MachineService) FillStatesForMachine(me int) error
- func (d *DBFT2MachineService) GetClock() timing.Clock
- func (d *DBFT2MachineService) GetFaultyNodes() int
- func (d *DBFT2MachineService) GetMachines() []machine.SingleTimerStateMachine
- func (d *DBFT2MachineService) GetMe() int
- func (d *DBFT2MachineService) GetName() string
- func (d *DBFT2MachineService) GetScheduledEvents() []replicated.ScheduledEvent
- func (d *DBFT2MachineService) GetWatchdog() timing.Timer
- func (d *DBFT2MachineService) Initialize(current single.State, param single.Param) single.State
- func (d *DBFT2MachineService) InitializeMulti(current replicated.MultiState, param replicated.MultiContext) (replicated.MultiState, error)
- func (d *DBFT2MachineService) IsFinal(current single.State, param single.Param) bool
- func (d *DBFT2MachineService) IsFinalMulti(current replicated.MultiState, param replicated.MultiContext) bool
- func (d *DBFT2MachineService) LaunchScheduleEvents(param replicated.MultiContext) error
- func (d *DBFT2MachineService) OnEnterState(current single.State, param single.Param)
- func (d *DBFT2MachineService) OnEnterStateMulti(current replicated.MultiState, param replicated.MultiContext)
- func (d *DBFT2MachineService) OnFinished(current single.State, param single.Param)
- func (d *DBFT2MachineService) RegisterMachine(machine machine.SingleTimerStateMachine)
- func (d *DBFT2MachineService) Run(current single.State, param single.Param) (single.State, error)
- func (d *DBFT2MachineService) SetWatchdog(timer timing.Timer)
- func (d *DBFT2MachineService) String() string
- func (d *DBFT2MachineService) StringFormat(format string) string
- func (d *DBFT2MachineService) UpdateState(current single.State, param single.Param) (single.State, bool, error)
- func (d *DBFT2MachineService) UpdateStateMulti(current replicated.MultiState, param replicated.MultiContext) (replicated.MultiState, bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBFT2Context ¶
type DBFT2Context interface { GetView() int GetHeight() int GetBlockTime() int GetNumberOfNodes() int }
func NewDBFT2Context ¶
func NewDBFT2Context(view int, height int, blockTime int, numberOfNodes int) DBFT2Context
type DBFT2ContextService ¶
type DBFT2ContextService struct {
// contains filtered or unexported fields
}
func (*DBFT2ContextService) GetBlockTime ¶
func (d *DBFT2ContextService) GetBlockTime() int
func (*DBFT2ContextService) GetHeight ¶
func (d *DBFT2ContextService) GetHeight() int
func (*DBFT2ContextService) GetNumberOfNodes ¶
func (d *DBFT2ContextService) GetNumberOfNodes() int
func (*DBFT2ContextService) GetView ¶
func (d *DBFT2ContextService) GetView() int
type DBFT2Machine ¶
type DBFT2Machine interface { // superclass TimedStateMachine // get / set GetClock() timing.Clock GetMe() int GetName() string // methods OnEnterState(current single.State, param single.Param) BeforeUpdateState(current single.State, param single.Param) bool AfterUpdateState(current single.State, param single.Param, updated bool) bool UpdateState(current single.State, param single.Param) (single.State, bool, error) IsFinal(current single.State, param single.Param) bool Initialize(current single.State, param single.Param) single.State OnFinished(current single.State, param single.Param) Run(current single.State, param single.Param) (single.State, error) // get / set GetMachines() []machine.SingleTimerStateMachine GetScheduledEvents() []replicated.ScheduledEvent GetWatchdog() timing.Timer SetWatchdog(timer timing.Timer) AddScheduleEvent(countdown float64, machine int, name string, eventParams []string) RegisterMachine(machine machine.SingleTimerStateMachine) LaunchScheduleEvents(param replicated.MultiContext) error InitializeMulti(current replicated.MultiState, param replicated.MultiContext) (replicated.MultiState, error) IsFinalMulti(current replicated.MultiState, param replicated.MultiContext) bool UpdateStateMulti(current replicated.MultiState, param replicated.MultiContext) (replicated.MultiState, bool, error) OnEnterStateMulti(current replicated.MultiState, param replicated.MultiContext) BeforeUpdateStateMulti(current replicated.MultiState, param replicated.MultiContext) bool // get / set GetFaultyNodes() int // methods FillStatesForMachine(me int) error FillSimpleCycle(me int) error StringFormat(format string) string String() string // contains filtered or unexported methods }
func NewDBFT2Machine ¶
func NewDBFT2MachineMachines ¶
func NewDBFT2MachineMachines(faultyNodes int, machines []machine.SingleTimerStateMachine, clock timing.Clock, me int, name string) (DBFT2Machine, error)
func NewDefaultDBFT2Machine ¶
type DBFT2MachineService ¶
type DBFT2MachineService struct {
// contains filtered or unexported fields
}
func (*DBFT2MachineService) AddScheduleEvent ¶
func (d *DBFT2MachineService) AddScheduleEvent(countdown float64, machine int, name string, eventParams []string)
func (*DBFT2MachineService) AfterUpdateState ¶
func (*DBFT2MachineService) BeforeUpdateState ¶
func (*DBFT2MachineService) BeforeUpdateStateMulti ¶
func (d *DBFT2MachineService) BeforeUpdateStateMulti(current replicated.MultiState, param replicated.MultiContext) bool
func (*DBFT2MachineService) FillSimpleCycle ¶
func (d *DBFT2MachineService) FillSimpleCycle(me int) error
func (*DBFT2MachineService) FillStatesForMachine ¶
func (d *DBFT2MachineService) FillStatesForMachine(me int) error
func (*DBFT2MachineService) GetClock ¶
func (d *DBFT2MachineService) GetClock() timing.Clock
func (*DBFT2MachineService) GetFaultyNodes ¶
func (d *DBFT2MachineService) GetFaultyNodes() int
func (*DBFT2MachineService) GetMachines ¶
func (d *DBFT2MachineService) GetMachines() []machine.SingleTimerStateMachine
func (*DBFT2MachineService) GetMe ¶
func (d *DBFT2MachineService) GetMe() int
func (*DBFT2MachineService) GetName ¶
func (d *DBFT2MachineService) GetName() string
func (*DBFT2MachineService) GetScheduledEvents ¶
func (d *DBFT2MachineService) GetScheduledEvents() []replicated.ScheduledEvent
func (*DBFT2MachineService) GetWatchdog ¶
func (d *DBFT2MachineService) GetWatchdog() timing.Timer
func (*DBFT2MachineService) Initialize ¶
func (*DBFT2MachineService) InitializeMulti ¶
func (d *DBFT2MachineService) InitializeMulti(current replicated.MultiState, param replicated.MultiContext) (replicated.MultiState, error)
func (*DBFT2MachineService) IsFinalMulti ¶
func (d *DBFT2MachineService) IsFinalMulti(current replicated.MultiState, param replicated.MultiContext) bool
func (*DBFT2MachineService) LaunchScheduleEvents ¶
func (d *DBFT2MachineService) LaunchScheduleEvents(param replicated.MultiContext) error
func (*DBFT2MachineService) OnEnterState ¶
func (d *DBFT2MachineService) OnEnterState(current single.State, param single.Param)
func (*DBFT2MachineService) OnEnterStateMulti ¶
func (d *DBFT2MachineService) OnEnterStateMulti(current replicated.MultiState, param replicated.MultiContext)
func (*DBFT2MachineService) OnFinished ¶
func (d *DBFT2MachineService) OnFinished(current single.State, param single.Param)
func (*DBFT2MachineService) RegisterMachine ¶
func (d *DBFT2MachineService) RegisterMachine(machine machine.SingleTimerStateMachine)
func (*DBFT2MachineService) SetWatchdog ¶
func (d *DBFT2MachineService) SetWatchdog(timer timing.Timer)
func (*DBFT2MachineService) String ¶
func (d *DBFT2MachineService) String() string
func (*DBFT2MachineService) StringFormat ¶
func (d *DBFT2MachineService) StringFormat(format string) string
func (*DBFT2MachineService) UpdateState ¶
func (*DBFT2MachineService) UpdateStateMulti ¶
func (d *DBFT2MachineService) UpdateStateMulti(current replicated.MultiState, param replicated.MultiContext) (replicated.MultiState, bool, error)
Click to show internal directories.
Click to hide internal directories.