Documentation
¶
Index ¶
- type MockNet
- func (m *MockNet) Receive(msg any)
- func (m *MockNet) ReceivedChannel() <-chan any
- func (m *MockNet) ResetSentMessages(protocol string)
- func (m *MockNet) Send(ctx context.Context, msg any, receivers ...peer.ID) error
- func (m *MockNet) SentMessages(protocol string) []PeerMessage
- func (m *MockNet) SetErrorState(err error)
- type PeerMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockNet ¶
type MockNet struct {
MessageCh chan any
// contains filtered or unexported fields
}
func NewMockNetwork ¶
func NewMockNetwork() *MockNet
func (*MockNet) ReceivedChannel ¶
func (*MockNet) ResetSentMessages ¶
func (*MockNet) SentMessages ¶
func (m *MockNet) SentMessages(protocol string) []PeerMessage
func (*MockNet) SetErrorState ¶ added in v0.2.0
type PeerMessage ¶
Click to show internal directories.
Click to hide internal directories.