testing

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenPeerID

func GenPeerID() (peer.ID, error)

GenPeerID generates a new network key

Types

type MockMessageEvent

type MockMessageEvent struct {
	From     peer.ID
	Topic    string
	Protocol string
	Msg      *spectypes.SSVMessage
}

MockMessageEvent is an abstraction used to push stream/pubsub messages

type TestEventHandler

type TestEventHandler func(e MockMessageEvent) spectypes.SSVMessage

TestEventHandler represents a function that handles a message event

type TestNetwork

type TestNetwork interface {
	protocolp2p.Network
	// contains filtered or unexported methods
}

TestNetwork is a wrapping interface that enables tests to run with local network

func NewMockNetwork

func NewMockNetwork(logger *zap.Logger, self peer.ID, inBufSize int) TestNetwork

NewMockNetwork creates a new instance of TestNetwork

Jump to

Keyboard shortcuts

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