rpc_replicated

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RPCMachineContext

type RPCMachineContext interface {
	// get / set
	GetParams() []single.Param
	GetMe() int
	GetWorld() []bftevent.BFTEventClient
	GetEvents() []events.Event
	// methods
	TestSetRegularDelay(testRegularDelayMS int)
	TestSetDropRate(dropRate float64)
	HasEvent(name string, eventArgs []string) bool
	RegisterEvent(event events.Event)
	AddEvents(events []events.Event)
	Broadcast(event string, eventArgs []string)
	AddEventFromRPC(name string, from machine.MachineId, parameters []string, delay int)

	String() string
}

func NewRPCMachineContext

func NewRPCMachineContext(params []single.Param, me int, world []bftevent.BFTEventClient, seed int) RPCMachineContext

type RPCMachineContextService

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

func (*RPCMachineContextService) AddEventFromRPC

func (r *RPCMachineContextService) AddEventFromRPC(name string, from machine.MachineId, parameters []string, delay int)

func (*RPCMachineContextService) AddEvents

func (r *RPCMachineContextService) AddEvents(events []events.Event)

func (*RPCMachineContextService) Broadcast

func (r *RPCMachineContextService) Broadcast(event string, eventArgs []string)

func (*RPCMachineContextService) GetEvents

func (r *RPCMachineContextService) GetEvents() []events.Event

func (*RPCMachineContextService) GetMe

func (r *RPCMachineContextService) GetMe() int

func (*RPCMachineContextService) GetParams

func (r *RPCMachineContextService) GetParams() []single.Param

func (*RPCMachineContextService) GetWorld

func (*RPCMachineContextService) HasEvent

func (r *RPCMachineContextService) HasEvent(name string, eventArgs []string) bool

func (*RPCMachineContextService) RegisterEvent

func (r *RPCMachineContextService) RegisterEvent(event events.Event)

func (*RPCMachineContextService) String

func (r *RPCMachineContextService) String() string

func (*RPCMachineContextService) TestSetDropRate

func (r *RPCMachineContextService) TestSetDropRate(dropRate float64)

func (*RPCMachineContextService) TestSetRegularDelay

func (r *RPCMachineContextService) TestSetRegularDelay(testRegularDelayMS int)

Jump to

Keyboard shortcuts

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