Documentation
¶
Index ¶
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 NewEchoEngine(t *testing.T, net network.EngineRegistry, cap int, channel channels.Channel, echo bool, send testutils.ConduitSendWrapperFunc) *EchoEngine
func (*EchoEngine) Process ¶
func (te *EchoEngine) Process(channel channels.Channel, originID flow.Identifier, event any) 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 any) 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 any)
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 any)
SubmitLocal is implemented for a valid type assertion to Engine any call to it fails the test