Documentation ¶
Index ¶
- type EchoEngine
- func (te *EchoEngine) Process(channel channels.Channel, originID flow.Identifier, event interface{}) error
- func (te *EchoEngine) ProcessLocal(event interface{}) error
- func (te *EchoEngine) Submit(channel channels.Channel, originID flow.Identifier, event interface{})
- func (te *EchoEngine) SubmitLocal(event interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EchoEngine ¶
type EchoEngine struct { sync.RWMutex mockcomponent.Component // contains filtered or unexported fields }
EchoEngine is a simple engine that is used for testing the correctness of driving the engines with libp2p, in addition to receiving and storing incoming messages it also echos them back
func NewEchoEngine ¶
func (*EchoEngine) Process ¶
func (te *EchoEngine) Process(channel channels.Channel, originID flow.Identifier, event interface{}) error
Process receives an originID and an event and casts them into the corresponding fields of the EchoEngine. It then flags the received channel on reception of an event. It also sends back an echo of the message to the origin ID
func (*EchoEngine) ProcessLocal ¶
func (te *EchoEngine) ProcessLocal(event interface{}) error
ProcessLocal is implemented for a valid type assertion to Engine any call to it fails the test
func (*EchoEngine) Submit ¶
func (te *EchoEngine) Submit(channel channels.Channel, originID flow.Identifier, event interface{})
Submit is implemented for a valid type assertion to Engine any call to it fails the test
func (*EchoEngine) SubmitLocal ¶
func (te *EchoEngine) SubmitLocal(event interface{})
SubmitLocal is implemented for a valid type assertion to Engine any call to it fails the test