mock_p2p

package
v0.40.1 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Overview

Package mock_p2p is a generated GoMock package.

Package mock_p2p is a generated GoMock package.

Package mock_p2p is a generated GoMock package.

Package mock_p2p is a generated GoMock package.

Package mock_p2p is a generated GoMock package.

Package mock_p2p is a generated GoMock package.

Package mock_p2p is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAddrBook

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

MockAddrBook is a mock of AddrBook interface.

func NewMockAddrBook

func NewMockAddrBook(ctrl *gomock.Controller) *MockAddrBook

NewMockAddrBook creates a new mock instance.

func (*MockAddrBook) AddAddr

func (m *MockAddrBook) AddAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)

AddAddr mocks base method.

func (*MockAddrBook) AddAddrs

func (m *MockAddrBook) AddAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)

AddAddrs mocks base method.

func (*MockAddrBook) AddrStream

func (m *MockAddrBook) AddrStream(arg0 context.Context, arg1 peer.ID) <-chan multiaddr.Multiaddr

AddrStream mocks base method.

func (*MockAddrBook) Addrs

func (m *MockAddrBook) Addrs(p peer.ID) []multiaddr.Multiaddr

Addrs mocks base method.

func (*MockAddrBook) ClearAddrs

func (m *MockAddrBook) ClearAddrs(p peer.ID)

ClearAddrs mocks base method.

func (*MockAddrBook) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAddrBook) PeersWithAddrs

func (m *MockAddrBook) PeersWithAddrs() peer.IDSlice

PeersWithAddrs mocks base method.

func (*MockAddrBook) SetAddr

func (m *MockAddrBook) SetAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)

SetAddr mocks base method.

func (*MockAddrBook) SetAddrs

func (m *MockAddrBook) SetAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)

SetAddrs mocks base method.

func (*MockAddrBook) UpdateAddrs

func (m *MockAddrBook) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Duration)

UpdateAddrs mocks base method.

type MockAddrBookMockRecorder

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

MockAddrBookMockRecorder is the mock recorder for MockAddrBook.

func (*MockAddrBookMockRecorder) AddAddr

func (mr *MockAddrBookMockRecorder) AddAddr(p, addr, ttl any) *gomock.Call

AddAddr indicates an expected call of AddAddr.

func (*MockAddrBookMockRecorder) AddAddrs

func (mr *MockAddrBookMockRecorder) AddAddrs(p, addrs, ttl any) *gomock.Call

AddAddrs indicates an expected call of AddAddrs.

func (*MockAddrBookMockRecorder) AddrStream

func (mr *MockAddrBookMockRecorder) AddrStream(arg0, arg1 any) *gomock.Call

AddrStream indicates an expected call of AddrStream.

func (*MockAddrBookMockRecorder) Addrs

func (mr *MockAddrBookMockRecorder) Addrs(p any) *gomock.Call

Addrs indicates an expected call of Addrs.

func (*MockAddrBookMockRecorder) ClearAddrs

func (mr *MockAddrBookMockRecorder) ClearAddrs(p any) *gomock.Call

ClearAddrs indicates an expected call of ClearAddrs.

func (*MockAddrBookMockRecorder) PeersWithAddrs

func (mr *MockAddrBookMockRecorder) PeersWithAddrs() *gomock.Call

PeersWithAddrs indicates an expected call of PeersWithAddrs.

func (*MockAddrBookMockRecorder) SetAddr

func (mr *MockAddrBookMockRecorder) SetAddr(p, addr, ttl any) *gomock.Call

SetAddr indicates an expected call of SetAddr.

func (*MockAddrBookMockRecorder) SetAddrs

func (mr *MockAddrBookMockRecorder) SetAddrs(p, addrs, ttl any) *gomock.Call

SetAddrs indicates an expected call of SetAddrs.

func (*MockAddrBookMockRecorder) UpdateAddrs

func (mr *MockAddrBookMockRecorder) UpdateAddrs(p, oldTTL, newTTL any) *gomock.Call

UpdateAddrs indicates an expected call of UpdateAddrs.

type MockCertifiedAddrBook

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

MockCertifiedAddrBook is a mock of CertifiedAddrBook interface.

func NewMockCertifiedAddrBook

func NewMockCertifiedAddrBook(ctrl *gomock.Controller) *MockCertifiedAddrBook

NewMockCertifiedAddrBook creates a new mock instance.

func (*MockCertifiedAddrBook) ConsumePeerRecord

func (m *MockCertifiedAddrBook) ConsumePeerRecord(s *record.Envelope, ttl time.Duration) (bool, error)

ConsumePeerRecord mocks base method.

func (*MockCertifiedAddrBook) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockCertifiedAddrBook) GetPeerRecord

func (m *MockCertifiedAddrBook) GetPeerRecord(p peer.ID) *record.Envelope

GetPeerRecord mocks base method.

type MockCertifiedAddrBookMockRecorder

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

MockCertifiedAddrBookMockRecorder is the mock recorder for MockCertifiedAddrBook.

func (*MockCertifiedAddrBookMockRecorder) ConsumePeerRecord

func (mr *MockCertifiedAddrBookMockRecorder) ConsumePeerRecord(s, ttl any) *gomock.Call

ConsumePeerRecord indicates an expected call of ConsumePeerRecord.

func (*MockCertifiedAddrBookMockRecorder) GetPeerRecord

func (mr *MockCertifiedAddrBookMockRecorder) GetPeerRecord(p any) *gomock.Call

GetPeerRecord indicates an expected call of GetPeerRecord.

type MockConn

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

MockConn is a mock of Conn interface.

func NewMockConn

func NewMockConn(ctrl *gomock.Controller) *MockConn

NewMockConn creates a new mock instance.

func (*MockConn) Close

func (m *MockConn) Close() error

Close mocks base method.

func (*MockConn) ConnState

func (m *MockConn) ConnState() network.ConnectionState

ConnState mocks base method.

func (*MockConn) EXPECT

func (m *MockConn) EXPECT() *MockConnMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConn) GetStreams

func (m *MockConn) GetStreams() []network.Stream

GetStreams mocks base method.

func (*MockConn) ID

func (m *MockConn) ID() string

ID mocks base method.

func (*MockConn) IsClosed

func (m *MockConn) IsClosed() bool

IsClosed mocks base method.

func (*MockConn) LocalMultiaddr

func (m *MockConn) LocalMultiaddr() multiaddr.Multiaddr

LocalMultiaddr mocks base method.

func (*MockConn) LocalPeer

func (m *MockConn) LocalPeer() peer.ID

LocalPeer mocks base method.

func (*MockConn) NewStream

func (m *MockConn) NewStream(arg0 context.Context) (network.Stream, error)

NewStream mocks base method.

func (*MockConn) RemoteMultiaddr

func (m *MockConn) RemoteMultiaddr() multiaddr.Multiaddr

RemoteMultiaddr mocks base method.

func (*MockConn) RemotePeer

func (m *MockConn) RemotePeer() peer.ID

RemotePeer mocks base method.

func (*MockConn) RemotePublicKey

func (m *MockConn) RemotePublicKey() crypto.PubKey

RemotePublicKey mocks base method.

func (*MockConn) Scope

func (m *MockConn) Scope() network.ConnScope

Scope mocks base method.

func (*MockConn) Stat

func (m *MockConn) Stat() network.ConnStats

Stat mocks base method.

type MockConnMockRecorder

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

MockConnMockRecorder is the mock recorder for MockConn.

func (*MockConnMockRecorder) Close

func (mr *MockConnMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockConnMockRecorder) ConnState

func (mr *MockConnMockRecorder) ConnState() *gomock.Call

ConnState indicates an expected call of ConnState.

func (*MockConnMockRecorder) GetStreams

func (mr *MockConnMockRecorder) GetStreams() *gomock.Call

GetStreams indicates an expected call of GetStreams.

func (*MockConnMockRecorder) ID

func (mr *MockConnMockRecorder) ID() *gomock.Call

ID indicates an expected call of ID.

func (*MockConnMockRecorder) IsClosed

func (mr *MockConnMockRecorder) IsClosed() *gomock.Call

IsClosed indicates an expected call of IsClosed.

func (*MockConnMockRecorder) LocalMultiaddr

func (mr *MockConnMockRecorder) LocalMultiaddr() *gomock.Call

LocalMultiaddr indicates an expected call of LocalMultiaddr.

func (*MockConnMockRecorder) LocalPeer

func (mr *MockConnMockRecorder) LocalPeer() *gomock.Call

LocalPeer indicates an expected call of LocalPeer.

func (*MockConnMockRecorder) NewStream

func (mr *MockConnMockRecorder) NewStream(arg0 any) *gomock.Call

NewStream indicates an expected call of NewStream.

func (*MockConnMockRecorder) RemoteMultiaddr

func (mr *MockConnMockRecorder) RemoteMultiaddr() *gomock.Call

RemoteMultiaddr indicates an expected call of RemoteMultiaddr.

func (*MockConnMockRecorder) RemotePeer

func (mr *MockConnMockRecorder) RemotePeer() *gomock.Call

RemotePeer indicates an expected call of RemotePeer.

func (*MockConnMockRecorder) RemotePublicKey

func (mr *MockConnMockRecorder) RemotePublicKey() *gomock.Call

RemotePublicKey indicates an expected call of RemotePublicKey.

func (*MockConnMockRecorder) Scope

func (mr *MockConnMockRecorder) Scope() *gomock.Call

Scope indicates an expected call of Scope.

func (*MockConnMockRecorder) Stat

func (mr *MockConnMockRecorder) Stat() *gomock.Call

Stat indicates an expected call of Stat.

type MockConnMultiaddrs

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

MockConnMultiaddrs is a mock of ConnMultiaddrs interface.

func NewMockConnMultiaddrs

func NewMockConnMultiaddrs(ctrl *gomock.Controller) *MockConnMultiaddrs

NewMockConnMultiaddrs creates a new mock instance.

func (*MockConnMultiaddrs) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConnMultiaddrs) LocalMultiaddr

func (m *MockConnMultiaddrs) LocalMultiaddr() multiaddr.Multiaddr

LocalMultiaddr mocks base method.

func (*MockConnMultiaddrs) RemoteMultiaddr

func (m *MockConnMultiaddrs) RemoteMultiaddr() multiaddr.Multiaddr

RemoteMultiaddr mocks base method.

type MockConnMultiaddrsMockRecorder

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

MockConnMultiaddrsMockRecorder is the mock recorder for MockConnMultiaddrs.

func (*MockConnMultiaddrsMockRecorder) LocalMultiaddr

func (mr *MockConnMultiaddrsMockRecorder) LocalMultiaddr() *gomock.Call

LocalMultiaddr indicates an expected call of LocalMultiaddr.

func (*MockConnMultiaddrsMockRecorder) RemoteMultiaddr

func (mr *MockConnMultiaddrsMockRecorder) RemoteMultiaddr() *gomock.Call

RemoteMultiaddr indicates an expected call of RemoteMultiaddr.

type MockConnScoper

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

MockConnScoper is a mock of ConnScoper interface.

func NewMockConnScoper

func NewMockConnScoper(ctrl *gomock.Controller) *MockConnScoper

NewMockConnScoper creates a new mock instance.

func (*MockConnScoper) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConnScoper) Scope

func (m *MockConnScoper) Scope() network.ConnScope

Scope mocks base method.

type MockConnScoperMockRecorder

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

MockConnScoperMockRecorder is the mock recorder for MockConnScoper.

func (*MockConnScoperMockRecorder) Scope

func (mr *MockConnScoperMockRecorder) Scope() *gomock.Call

Scope indicates an expected call of Scope.

type MockConnSecurity

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

MockConnSecurity is a mock of ConnSecurity interface.

func NewMockConnSecurity

func NewMockConnSecurity(ctrl *gomock.Controller) *MockConnSecurity

NewMockConnSecurity creates a new mock instance.

func (*MockConnSecurity) ConnState

func (m *MockConnSecurity) ConnState() network.ConnectionState

ConnState mocks base method.

func (*MockConnSecurity) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConnSecurity) LocalPeer

func (m *MockConnSecurity) LocalPeer() peer.ID

LocalPeer mocks base method.

func (*MockConnSecurity) RemotePeer

func (m *MockConnSecurity) RemotePeer() peer.ID

RemotePeer mocks base method.

func (*MockConnSecurity) RemotePublicKey

func (m *MockConnSecurity) RemotePublicKey() crypto.PubKey

RemotePublicKey mocks base method.

type MockConnSecurityMockRecorder

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

MockConnSecurityMockRecorder is the mock recorder for MockConnSecurity.

func (*MockConnSecurityMockRecorder) ConnState

func (mr *MockConnSecurityMockRecorder) ConnState() *gomock.Call

ConnState indicates an expected call of ConnState.

func (*MockConnSecurityMockRecorder) LocalPeer

func (mr *MockConnSecurityMockRecorder) LocalPeer() *gomock.Call

LocalPeer indicates an expected call of LocalPeer.

func (*MockConnSecurityMockRecorder) RemotePeer

func (mr *MockConnSecurityMockRecorder) RemotePeer() *gomock.Call

RemotePeer indicates an expected call of RemotePeer.

func (*MockConnSecurityMockRecorder) RemotePublicKey

func (mr *MockConnSecurityMockRecorder) RemotePublicKey() *gomock.Call

RemotePublicKey indicates an expected call of RemotePublicKey.

type MockConnStat

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

MockConnStat is a mock of ConnStat interface.

func NewMockConnStat

func NewMockConnStat(ctrl *gomock.Controller) *MockConnStat

NewMockConnStat creates a new mock instance.

func (*MockConnStat) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockConnStat) Stat

func (m *MockConnStat) Stat() network.ConnStats

Stat mocks base method.

type MockConnStatMockRecorder

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

MockConnStatMockRecorder is the mock recorder for MockConnStat.

func (*MockConnStatMockRecorder) Stat

func (mr *MockConnStatMockRecorder) Stat() *gomock.Call

Stat indicates an expected call of Stat.

type MockDialer

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

MockDialer is a mock of Dialer interface.

func NewMockDialer

func NewMockDialer(ctrl *gomock.Controller) *MockDialer

NewMockDialer creates a new mock instance.

func (*MockDialer) ClosePeer

func (m *MockDialer) ClosePeer(arg0 peer.ID) error

ClosePeer mocks base method.

func (*MockDialer) Connectedness

func (m *MockDialer) Connectedness(arg0 peer.ID) network.Connectedness

Connectedness mocks base method.

func (*MockDialer) Conns

func (m *MockDialer) Conns() []network.Conn

Conns mocks base method.

func (*MockDialer) ConnsToPeer

func (m *MockDialer) ConnsToPeer(p peer.ID) []network.Conn

ConnsToPeer mocks base method.

func (*MockDialer) DialPeer

func (m *MockDialer) DialPeer(arg0 context.Context, arg1 peer.ID) (network.Conn, error)

DialPeer mocks base method.

func (*MockDialer) EXPECT

func (m *MockDialer) EXPECT() *MockDialerMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockDialer) LocalPeer

func (m *MockDialer) LocalPeer() peer.ID

LocalPeer mocks base method.

func (*MockDialer) Notify

func (m *MockDialer) Notify(arg0 network.Notifiee)

Notify mocks base method.

func (*MockDialer) Peers

func (m *MockDialer) Peers() []peer.ID

Peers mocks base method.

func (*MockDialer) Peerstore

func (m *MockDialer) Peerstore() peerstore.Peerstore

Peerstore mocks base method.

func (*MockDialer) StopNotify

func (m *MockDialer) StopNotify(arg0 network.Notifiee)

StopNotify mocks base method.

type MockDialerMockRecorder

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

MockDialerMockRecorder is the mock recorder for MockDialer.

func (*MockDialerMockRecorder) ClosePeer

func (mr *MockDialerMockRecorder) ClosePeer(arg0 any) *gomock.Call

ClosePeer indicates an expected call of ClosePeer.

func (*MockDialerMockRecorder) Connectedness

func (mr *MockDialerMockRecorder) Connectedness(arg0 any) *gomock.Call

Connectedness indicates an expected call of Connectedness.

func (*MockDialerMockRecorder) Conns

func (mr *MockDialerMockRecorder) Conns() *gomock.Call

Conns indicates an expected call of Conns.

func (*MockDialerMockRecorder) ConnsToPeer

func (mr *MockDialerMockRecorder) ConnsToPeer(p any) *gomock.Call

ConnsToPeer indicates an expected call of ConnsToPeer.

func (*MockDialerMockRecorder) DialPeer

func (mr *MockDialerMockRecorder) DialPeer(arg0, arg1 any) *gomock.Call

DialPeer indicates an expected call of DialPeer.

func (*MockDialerMockRecorder) LocalPeer

func (mr *MockDialerMockRecorder) LocalPeer() *gomock.Call

LocalPeer indicates an expected call of LocalPeer.

func (*MockDialerMockRecorder) Notify

func (mr *MockDialerMockRecorder) Notify(arg0 any) *gomock.Call

Notify indicates an expected call of Notify.

func (*MockDialerMockRecorder) Peers

func (mr *MockDialerMockRecorder) Peers() *gomock.Call

Peers indicates an expected call of Peers.

func (*MockDialerMockRecorder) Peerstore

func (mr *MockDialerMockRecorder) Peerstore() *gomock.Call

Peerstore indicates an expected call of Peerstore.

func (*MockDialerMockRecorder) StopNotify

func (mr *MockDialerMockRecorder) StopNotify(arg0 any) *gomock.Call

StopNotify indicates an expected call of StopNotify.

type MockHost

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

MockHost is a mock of Host interface.

func NewMockHost

func NewMockHost(ctrl *gomock.Controller) *MockHost

NewMockHost creates a new mock instance.

func (*MockHost) Addrs

func (m *MockHost) Addrs() []multiaddr.Multiaddr

Addrs mocks base method.

func (*MockHost) Close

func (m *MockHost) Close() error

Close mocks base method.

func (*MockHost) ConnManager

func (m *MockHost) ConnManager() connmgr.ConnManager

ConnManager mocks base method.

func (*MockHost) Connect

func (m *MockHost) Connect(ctx context.Context, pi peer.AddrInfo) error

Connect mocks base method.

func (*MockHost) EXPECT

func (m *MockHost) EXPECT() *MockHostMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockHost) EventBus

func (m *MockHost) EventBus() event.Bus

EventBus mocks base method.

func (*MockHost) ID

func (m *MockHost) ID() peer.ID

ID mocks base method.

func (*MockHost) Mux

func (m *MockHost) Mux() protocol.Switch

Mux mocks base method.

func (*MockHost) Network

func (m *MockHost) Network() network.Network

Network mocks base method.

func (*MockHost) NewStream

func (m *MockHost) NewStream(ctx context.Context, p peer.ID, pids ...protocol.ID) (network.Stream, error)

NewStream mocks base method.

func (*MockHost) Peerstore

func (m *MockHost) Peerstore() peerstore.Peerstore

Peerstore mocks base method.

func (*MockHost) RemoveStreamHandler

func (m *MockHost) RemoveStreamHandler(pid protocol.ID)

RemoveStreamHandler mocks base method.

func (*MockHost) SetStreamHandler

func (m *MockHost) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)

SetStreamHandler mocks base method.

func (*MockHost) SetStreamHandlerMatch

func (m *MockHost) SetStreamHandlerMatch(arg0 protocol.ID, arg1 func(protocol.ID) bool, arg2 network.StreamHandler)

SetStreamHandlerMatch mocks base method.

type MockHostMockRecorder

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

MockHostMockRecorder is the mock recorder for MockHost.

func (*MockHostMockRecorder) Addrs

func (mr *MockHostMockRecorder) Addrs() *gomock.Call

Addrs indicates an expected call of Addrs.

func (*MockHostMockRecorder) Close

func (mr *MockHostMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockHostMockRecorder) ConnManager

func (mr *MockHostMockRecorder) ConnManager() *gomock.Call

ConnManager indicates an expected call of ConnManager.

func (*MockHostMockRecorder) Connect

func (mr *MockHostMockRecorder) Connect(ctx, pi any) *gomock.Call

Connect indicates an expected call of Connect.

func (*MockHostMockRecorder) EventBus

func (mr *MockHostMockRecorder) EventBus() *gomock.Call

EventBus indicates an expected call of EventBus.

func (*MockHostMockRecorder) ID

func (mr *MockHostMockRecorder) ID() *gomock.Call

ID indicates an expected call of ID.

func (*MockHostMockRecorder) Mux

func (mr *MockHostMockRecorder) Mux() *gomock.Call

Mux indicates an expected call of Mux.

func (*MockHostMockRecorder) Network

func (mr *MockHostMockRecorder) Network() *gomock.Call

Network indicates an expected call of Network.

func (*MockHostMockRecorder) NewStream

func (mr *MockHostMockRecorder) NewStream(ctx, p any, pids ...any) *gomock.Call

NewStream indicates an expected call of NewStream.

func (*MockHostMockRecorder) Peerstore

func (mr *MockHostMockRecorder) Peerstore() *gomock.Call

Peerstore indicates an expected call of Peerstore.

func (*MockHostMockRecorder) RemoveStreamHandler

func (mr *MockHostMockRecorder) RemoveStreamHandler(pid any) *gomock.Call

RemoveStreamHandler indicates an expected call of RemoveStreamHandler.

func (*MockHostMockRecorder) SetStreamHandler

func (mr *MockHostMockRecorder) SetStreamHandler(pid, handler any) *gomock.Call

SetStreamHandler indicates an expected call of SetStreamHandler.

func (*MockHostMockRecorder) SetStreamHandlerMatch

func (mr *MockHostMockRecorder) SetStreamHandlerMatch(arg0, arg1, arg2 any) *gomock.Call

SetStreamHandlerMatch indicates an expected call of SetStreamHandlerMatch.

type MockKey

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

MockKey is a mock of Key interface.

func NewMockKey

func NewMockKey(ctrl *gomock.Controller) *MockKey

NewMockKey creates a new mock instance.

func (*MockKey) EXPECT

func (m *MockKey) EXPECT() *MockKeyMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockKey) Equals

func (m *MockKey) Equals(arg0 crypto.Key) bool

Equals mocks base method.

func (*MockKey) Raw

func (m *MockKey) Raw() ([]byte, error)

Raw mocks base method.

func (*MockKey) Type

func (m *MockKey) Type() pb.KeyType

Type mocks base method.

type MockKeyBook

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

MockKeyBook is a mock of KeyBook interface.

func NewMockKeyBook

func NewMockKeyBook(ctrl *gomock.Controller) *MockKeyBook

NewMockKeyBook creates a new mock instance.

func (*MockKeyBook) AddPrivKey

func (m *MockKeyBook) AddPrivKey(arg0 peer.ID, arg1 crypto.PrivKey) error

AddPrivKey mocks base method.

func (*MockKeyBook) AddPubKey

func (m *MockKeyBook) AddPubKey(arg0 peer.ID, arg1 crypto.PubKey) error

AddPubKey mocks base method.

func (*MockKeyBook) EXPECT

func (m *MockKeyBook) EXPECT() *MockKeyBookMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockKeyBook) PeersWithKeys

func (m *MockKeyBook) PeersWithKeys() peer.IDSlice

PeersWithKeys mocks base method.

func (*MockKeyBook) PrivKey

func (m *MockKeyBook) PrivKey(arg0 peer.ID) crypto.PrivKey

PrivKey mocks base method.

func (*MockKeyBook) PubKey

func (m *MockKeyBook) PubKey(arg0 peer.ID) crypto.PubKey

PubKey mocks base method.

func (*MockKeyBook) RemovePeer

func (m *MockKeyBook) RemovePeer(arg0 peer.ID)

RemovePeer mocks base method.

type MockKeyBookMockRecorder

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

MockKeyBookMockRecorder is the mock recorder for MockKeyBook.

func (*MockKeyBookMockRecorder) AddPrivKey

func (mr *MockKeyBookMockRecorder) AddPrivKey(arg0, arg1 any) *gomock.Call

AddPrivKey indicates an expected call of AddPrivKey.

func (*MockKeyBookMockRecorder) AddPubKey

func (mr *MockKeyBookMockRecorder) AddPubKey(arg0, arg1 any) *gomock.Call

AddPubKey indicates an expected call of AddPubKey.

func (*MockKeyBookMockRecorder) PeersWithKeys

func (mr *MockKeyBookMockRecorder) PeersWithKeys() *gomock.Call

PeersWithKeys indicates an expected call of PeersWithKeys.

func (*MockKeyBookMockRecorder) PrivKey

func (mr *MockKeyBookMockRecorder) PrivKey(arg0 any) *gomock.Call

PrivKey indicates an expected call of PrivKey.

func (*MockKeyBookMockRecorder) PubKey

func (mr *MockKeyBookMockRecorder) PubKey(arg0 any) *gomock.Call

PubKey indicates an expected call of PubKey.

func (*MockKeyBookMockRecorder) RemovePeer

func (mr *MockKeyBookMockRecorder) RemovePeer(arg0 any) *gomock.Call

RemovePeer indicates an expected call of RemovePeer.

type MockKeyMockRecorder

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

MockKeyMockRecorder is the mock recorder for MockKey.

func (*MockKeyMockRecorder) Equals

func (mr *MockKeyMockRecorder) Equals(arg0 any) *gomock.Call

Equals indicates an expected call of Equals.

func (*MockKeyMockRecorder) Raw

func (mr *MockKeyMockRecorder) Raw() *gomock.Call

Raw indicates an expected call of Raw.

func (*MockKeyMockRecorder) Type

func (mr *MockKeyMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type.

type MockMetrics

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

MockMetrics is a mock of Metrics interface.

func NewMockMetrics

func NewMockMetrics(ctrl *gomock.Controller) *MockMetrics

NewMockMetrics creates a new mock instance.

func (*MockMetrics) EXPECT

func (m *MockMetrics) EXPECT() *MockMetricsMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMetrics) LatencyEWMA

func (m *MockMetrics) LatencyEWMA(arg0 peer.ID) time.Duration

LatencyEWMA mocks base method.

func (*MockMetrics) RecordLatency

func (m *MockMetrics) RecordLatency(arg0 peer.ID, arg1 time.Duration)

RecordLatency mocks base method.

func (*MockMetrics) RemovePeer

func (m *MockMetrics) RemovePeer(arg0 peer.ID)

RemovePeer mocks base method.

type MockMetricsMockRecorder

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

MockMetricsMockRecorder is the mock recorder for MockMetrics.

func (*MockMetricsMockRecorder) LatencyEWMA

func (mr *MockMetricsMockRecorder) LatencyEWMA(arg0 any) *gomock.Call

LatencyEWMA indicates an expected call of LatencyEWMA.

func (*MockMetricsMockRecorder) RecordLatency

func (mr *MockMetricsMockRecorder) RecordLatency(arg0, arg1 any) *gomock.Call

RecordLatency indicates an expected call of RecordLatency.

func (*MockMetricsMockRecorder) RemovePeer

func (mr *MockMetricsMockRecorder) RemovePeer(arg0 any) *gomock.Call

RemovePeer indicates an expected call of RemovePeer.

type MockMuxedStream

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

MockMuxedStream is a mock of MuxedStream interface.

func NewMockMuxedStream

func NewMockMuxedStream(ctrl *gomock.Controller) *MockMuxedStream

NewMockMuxedStream creates a new mock instance.

func (*MockMuxedStream) Close

func (m *MockMuxedStream) Close() error

Close mocks base method.

func (*MockMuxedStream) CloseRead

func (m *MockMuxedStream) CloseRead() error

CloseRead mocks base method.

func (*MockMuxedStream) CloseWrite

func (m *MockMuxedStream) CloseWrite() error

CloseWrite mocks base method.

func (*MockMuxedStream) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockMuxedStream) Read

func (m *MockMuxedStream) Read(p []byte) (int, error)

Read mocks base method.

func (*MockMuxedStream) Reset

func (m *MockMuxedStream) Reset() error

Reset mocks base method.

func (*MockMuxedStream) SetDeadline

func (m *MockMuxedStream) SetDeadline(arg0 time.Time) error

SetDeadline mocks base method.

func (*MockMuxedStream) SetReadDeadline

func (m *MockMuxedStream) SetReadDeadline(arg0 time.Time) error

SetReadDeadline mocks base method.

func (*MockMuxedStream) SetWriteDeadline

func (m *MockMuxedStream) SetWriteDeadline(arg0 time.Time) error

SetWriteDeadline mocks base method.

func (*MockMuxedStream) Write

func (m *MockMuxedStream) Write(p []byte) (int, error)

Write mocks base method.

type MockMuxedStreamMockRecorder

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

MockMuxedStreamMockRecorder is the mock recorder for MockMuxedStream.

func (*MockMuxedStreamMockRecorder) Close

Close indicates an expected call of Close.

func (*MockMuxedStreamMockRecorder) CloseRead

func (mr *MockMuxedStreamMockRecorder) CloseRead() *gomock.Call

CloseRead indicates an expected call of CloseRead.

func (*MockMuxedStreamMockRecorder) CloseWrite

func (mr *MockMuxedStreamMockRecorder) CloseWrite() *gomock.Call

CloseWrite indicates an expected call of CloseWrite.

func (*MockMuxedStreamMockRecorder) Read

Read indicates an expected call of Read.

func (*MockMuxedStreamMockRecorder) Reset

Reset indicates an expected call of Reset.

func (*MockMuxedStreamMockRecorder) SetDeadline

func (mr *MockMuxedStreamMockRecorder) SetDeadline(arg0 any) *gomock.Call

SetDeadline indicates an expected call of SetDeadline.

func (*MockMuxedStreamMockRecorder) SetReadDeadline

func (mr *MockMuxedStreamMockRecorder) SetReadDeadline(arg0 any) *gomock.Call

SetReadDeadline indicates an expected call of SetReadDeadline.

func (*MockMuxedStreamMockRecorder) SetWriteDeadline

func (mr *MockMuxedStreamMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call

SetWriteDeadline indicates an expected call of SetWriteDeadline.

func (*MockMuxedStreamMockRecorder) Write

Write indicates an expected call of Write.

type MockNetwork

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

MockNetwork is a mock of Network interface.

func NewMockNetwork

func NewMockNetwork(ctrl *gomock.Controller) *MockNetwork

NewMockNetwork creates a new mock instance.

func (*MockNetwork) Close

func (m *MockNetwork) Close() error

Close mocks base method.

func (*MockNetwork) ClosePeer

func (m *MockNetwork) ClosePeer(arg0 peer.ID) error

ClosePeer mocks base method.

func (*MockNetwork) Connectedness

func (m *MockNetwork) Connectedness(arg0 peer.ID) network.Connectedness

Connectedness mocks base method.

func (*MockNetwork) Conns

func (m *MockNetwork) Conns() []network.Conn

Conns mocks base method.

func (*MockNetwork) ConnsToPeer

func (m *MockNetwork) ConnsToPeer(p peer.ID) []network.Conn

ConnsToPeer mocks base method.

func (*MockNetwork) DialPeer

func (m *MockNetwork) DialPeer(arg0 context.Context, arg1 peer.ID) (network.Conn, error)

DialPeer mocks base method.

func (*MockNetwork) EXPECT

func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockNetwork) InterfaceListenAddresses

func (m *MockNetwork) InterfaceListenAddresses() ([]multiaddr.Multiaddr, error)

InterfaceListenAddresses mocks base method.

func (*MockNetwork) Listen

func (m *MockNetwork) Listen(arg0 ...multiaddr.Multiaddr) error

Listen mocks base method.

func (*MockNetwork) ListenAddresses

func (m *MockNetwork) ListenAddresses() []multiaddr.Multiaddr

ListenAddresses mocks base method.

func (*MockNetwork) LocalPeer

func (m *MockNetwork) LocalPeer() peer.ID

LocalPeer mocks base method.

func (*MockNetwork) NewStream

func (m *MockNetwork) NewStream(arg0 context.Context, arg1 peer.ID) (network.Stream, error)

NewStream mocks base method.

func (*MockNetwork) Notify

func (m *MockNetwork) Notify(arg0 network.Notifiee)

Notify mocks base method.

func (*MockNetwork) Peers

func (m *MockNetwork) Peers() []peer.ID

Peers mocks base method.

func (*MockNetwork) Peerstore

func (m *MockNetwork) Peerstore() peerstore.Peerstore

Peerstore mocks base method.

func (*MockNetwork) ResourceManager

func (m *MockNetwork) ResourceManager() network.ResourceManager

ResourceManager mocks base method.

func (*MockNetwork) SetStreamHandler

func (m *MockNetwork) SetStreamHandler(arg0 network.StreamHandler)

SetStreamHandler mocks base method.

func (*MockNetwork) StopNotify

func (m *MockNetwork) StopNotify(arg0 network.Notifiee)

StopNotify mocks base method.

type MockNetworkMockRecorder

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

MockNetworkMockRecorder is the mock recorder for MockNetwork.

func (*MockNetworkMockRecorder) Close

func (mr *MockNetworkMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockNetworkMockRecorder) ClosePeer

func (mr *MockNetworkMockRecorder) ClosePeer(arg0 any) *gomock.Call

ClosePeer indicates an expected call of ClosePeer.

func (*MockNetworkMockRecorder) Connectedness

func (mr *MockNetworkMockRecorder) Connectedness(arg0 any) *gomock.Call

Connectedness indicates an expected call of Connectedness.

func (*MockNetworkMockRecorder) Conns

func (mr *MockNetworkMockRecorder) Conns() *gomock.Call

Conns indicates an expected call of Conns.

func (*MockNetworkMockRecorder) ConnsToPeer

func (mr *MockNetworkMockRecorder) ConnsToPeer(p any) *gomock.Call

ConnsToPeer indicates an expected call of ConnsToPeer.

func (*MockNetworkMockRecorder) DialPeer

func (mr *MockNetworkMockRecorder) DialPeer(arg0, arg1 any) *gomock.Call

DialPeer indicates an expected call of DialPeer.

func (*MockNetworkMockRecorder) InterfaceListenAddresses

func (mr *MockNetworkMockRecorder) InterfaceListenAddresses() *gomock.Call

InterfaceListenAddresses indicates an expected call of InterfaceListenAddresses.

func (*MockNetworkMockRecorder) Listen

func (mr *MockNetworkMockRecorder) Listen(arg0 ...any) *gomock.Call

Listen indicates an expected call of Listen.

func (*MockNetworkMockRecorder) ListenAddresses

func (mr *MockNetworkMockRecorder) ListenAddresses() *gomock.Call

ListenAddresses indicates an expected call of ListenAddresses.

func (*MockNetworkMockRecorder) LocalPeer

func (mr *MockNetworkMockRecorder) LocalPeer() *gomock.Call

LocalPeer indicates an expected call of LocalPeer.

func (*MockNetworkMockRecorder) NewStream

func (mr *MockNetworkMockRecorder) NewStream(arg0, arg1 any) *gomock.Call

NewStream indicates an expected call of NewStream.

func (*MockNetworkMockRecorder) Notify

func (mr *MockNetworkMockRecorder) Notify(arg0 any) *gomock.Call

Notify indicates an expected call of Notify.

func (*MockNetworkMockRecorder) Peers

func (mr *MockNetworkMockRecorder) Peers() *gomock.Call

Peers indicates an expected call of Peers.

func (*MockNetworkMockRecorder) Peerstore

func (mr *MockNetworkMockRecorder) Peerstore() *gomock.Call

Peerstore indicates an expected call of Peerstore.

func (*MockNetworkMockRecorder) ResourceManager

func (mr *MockNetworkMockRecorder) ResourceManager() *gomock.Call

ResourceManager indicates an expected call of ResourceManager.

func (*MockNetworkMockRecorder) SetStreamHandler

func (mr *MockNetworkMockRecorder) SetStreamHandler(arg0 any) *gomock.Call

SetStreamHandler indicates an expected call of SetStreamHandler.

func (*MockNetworkMockRecorder) StopNotify

func (mr *MockNetworkMockRecorder) StopNotify(arg0 any) *gomock.Call

StopNotify indicates an expected call of StopNotify.

type MockPeerMetadata

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

MockPeerMetadata is a mock of PeerMetadata interface.

func NewMockPeerMetadata

func NewMockPeerMetadata(ctrl *gomock.Controller) *MockPeerMetadata

NewMockPeerMetadata creates a new mock instance.

func (*MockPeerMetadata) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPeerMetadata) Get

func (m *MockPeerMetadata) Get(p peer.ID, key string) (any, error)

Get mocks base method.

func (*MockPeerMetadata) Put

func (m *MockPeerMetadata) Put(p peer.ID, key string, val any) error

Put mocks base method.

func (*MockPeerMetadata) RemovePeer

func (m *MockPeerMetadata) RemovePeer(arg0 peer.ID)

RemovePeer mocks base method.

type MockPeerMetadataMockRecorder

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

MockPeerMetadataMockRecorder is the mock recorder for MockPeerMetadata.

func (*MockPeerMetadataMockRecorder) Get

func (mr *MockPeerMetadataMockRecorder) Get(p, key any) *gomock.Call

Get indicates an expected call of Get.

func (*MockPeerMetadataMockRecorder) Put

func (mr *MockPeerMetadataMockRecorder) Put(p, key, val any) *gomock.Call

Put indicates an expected call of Put.

func (*MockPeerMetadataMockRecorder) RemovePeer

func (mr *MockPeerMetadataMockRecorder) RemovePeer(arg0 any) *gomock.Call

RemovePeer indicates an expected call of RemovePeer.

type MockPeerstore

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

MockPeerstore is a mock of Peerstore interface.

func NewMockPeerstore

func NewMockPeerstore(ctrl *gomock.Controller) *MockPeerstore

NewMockPeerstore creates a new mock instance.

func (*MockPeerstore) AddAddr

func (m *MockPeerstore) AddAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)

AddAddr mocks base method.

func (*MockPeerstore) AddAddrs

func (m *MockPeerstore) AddAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)

AddAddrs mocks base method.

func (*MockPeerstore) AddPrivKey

func (m *MockPeerstore) AddPrivKey(arg0 peer.ID, arg1 crypto.PrivKey) error

AddPrivKey mocks base method.

func (*MockPeerstore) AddProtocols

func (m *MockPeerstore) AddProtocols(arg0 peer.ID, arg1 ...protocol.ID) error

AddProtocols mocks base method.

func (*MockPeerstore) AddPubKey

func (m *MockPeerstore) AddPubKey(arg0 peer.ID, arg1 crypto.PubKey) error

AddPubKey mocks base method.

func (*MockPeerstore) AddrStream

func (m *MockPeerstore) AddrStream(arg0 context.Context, arg1 peer.ID) <-chan multiaddr.Multiaddr

AddrStream mocks base method.

func (*MockPeerstore) Addrs

func (m *MockPeerstore) Addrs(p peer.ID) []multiaddr.Multiaddr

Addrs mocks base method.

func (*MockPeerstore) ClearAddrs

func (m *MockPeerstore) ClearAddrs(p peer.ID)

ClearAddrs mocks base method.

func (*MockPeerstore) Close

func (m *MockPeerstore) Close() error

Close mocks base method.

func (*MockPeerstore) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPeerstore) FirstSupportedProtocol

func (m *MockPeerstore) FirstSupportedProtocol(arg0 peer.ID, arg1 ...protocol.ID) (protocol.ID, error)

FirstSupportedProtocol mocks base method.

func (*MockPeerstore) Get

func (m *MockPeerstore) Get(p peer.ID, key string) (any, error)

Get mocks base method.

func (*MockPeerstore) GetProtocols

func (m *MockPeerstore) GetProtocols(arg0 peer.ID) ([]protocol.ID, error)

GetProtocols mocks base method.

func (*MockPeerstore) LatencyEWMA

func (m *MockPeerstore) LatencyEWMA(arg0 peer.ID) time.Duration

LatencyEWMA mocks base method.

func (*MockPeerstore) PeerInfo

func (m *MockPeerstore) PeerInfo(arg0 peer.ID) peer.AddrInfo

PeerInfo mocks base method.

func (*MockPeerstore) Peers

func (m *MockPeerstore) Peers() peer.IDSlice

Peers mocks base method.

func (*MockPeerstore) PeersWithAddrs

func (m *MockPeerstore) PeersWithAddrs() peer.IDSlice

PeersWithAddrs mocks base method.

func (*MockPeerstore) PeersWithKeys

func (m *MockPeerstore) PeersWithKeys() peer.IDSlice

PeersWithKeys mocks base method.

func (*MockPeerstore) PrivKey

func (m *MockPeerstore) PrivKey(arg0 peer.ID) crypto.PrivKey

PrivKey mocks base method.

func (*MockPeerstore) PubKey

func (m *MockPeerstore) PubKey(arg0 peer.ID) crypto.PubKey

PubKey mocks base method.

func (*MockPeerstore) Put

func (m *MockPeerstore) Put(p peer.ID, key string, val any) error

Put mocks base method.

func (*MockPeerstore) RecordLatency

func (m *MockPeerstore) RecordLatency(arg0 peer.ID, arg1 time.Duration)

RecordLatency mocks base method.

func (*MockPeerstore) RemovePeer

func (m *MockPeerstore) RemovePeer(arg0 peer.ID)

RemovePeer mocks base method.

func (*MockPeerstore) RemoveProtocols

func (m *MockPeerstore) RemoveProtocols(arg0 peer.ID, arg1 ...protocol.ID) error

RemoveProtocols mocks base method.

func (*MockPeerstore) SetAddr

func (m *MockPeerstore) SetAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)

SetAddr mocks base method.

func (*MockPeerstore) SetAddrs

func (m *MockPeerstore) SetAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)

SetAddrs mocks base method.

func (*MockPeerstore) SetProtocols

func (m *MockPeerstore) SetProtocols(arg0 peer.ID, arg1 ...protocol.ID) error

SetProtocols mocks base method.

func (*MockPeerstore) SupportsProtocols

func (m *MockPeerstore) SupportsProtocols(arg0 peer.ID, arg1 ...protocol.ID) ([]protocol.ID, error)

SupportsProtocols mocks base method.

func (*MockPeerstore) UpdateAddrs

func (m *MockPeerstore) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Duration)

UpdateAddrs mocks base method.

type MockPeerstoreMockRecorder

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

MockPeerstoreMockRecorder is the mock recorder for MockPeerstore.

func (*MockPeerstoreMockRecorder) AddAddr

func (mr *MockPeerstoreMockRecorder) AddAddr(p, addr, ttl any) *gomock.Call

AddAddr indicates an expected call of AddAddr.

func (*MockPeerstoreMockRecorder) AddAddrs

func (mr *MockPeerstoreMockRecorder) AddAddrs(p, addrs, ttl any) *gomock.Call

AddAddrs indicates an expected call of AddAddrs.

func (*MockPeerstoreMockRecorder) AddPrivKey

func (mr *MockPeerstoreMockRecorder) AddPrivKey(arg0, arg1 any) *gomock.Call

AddPrivKey indicates an expected call of AddPrivKey.

func (*MockPeerstoreMockRecorder) AddProtocols

func (mr *MockPeerstoreMockRecorder) AddProtocols(arg0 any, arg1 ...any) *gomock.Call

AddProtocols indicates an expected call of AddProtocols.

func (*MockPeerstoreMockRecorder) AddPubKey

func (mr *MockPeerstoreMockRecorder) AddPubKey(arg0, arg1 any) *gomock.Call

AddPubKey indicates an expected call of AddPubKey.

func (*MockPeerstoreMockRecorder) AddrStream

func (mr *MockPeerstoreMockRecorder) AddrStream(arg0, arg1 any) *gomock.Call

AddrStream indicates an expected call of AddrStream.

func (*MockPeerstoreMockRecorder) Addrs

func (mr *MockPeerstoreMockRecorder) Addrs(p any) *gomock.Call

Addrs indicates an expected call of Addrs.

func (*MockPeerstoreMockRecorder) ClearAddrs

func (mr *MockPeerstoreMockRecorder) ClearAddrs(p any) *gomock.Call

ClearAddrs indicates an expected call of ClearAddrs.

func (*MockPeerstoreMockRecorder) Close

func (mr *MockPeerstoreMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockPeerstoreMockRecorder) FirstSupportedProtocol

func (mr *MockPeerstoreMockRecorder) FirstSupportedProtocol(arg0 any, arg1 ...any) *gomock.Call

FirstSupportedProtocol indicates an expected call of FirstSupportedProtocol.

func (*MockPeerstoreMockRecorder) Get

func (mr *MockPeerstoreMockRecorder) Get(p, key any) *gomock.Call

Get indicates an expected call of Get.

func (*MockPeerstoreMockRecorder) GetProtocols

func (mr *MockPeerstoreMockRecorder) GetProtocols(arg0 any) *gomock.Call

GetProtocols indicates an expected call of GetProtocols.

func (*MockPeerstoreMockRecorder) LatencyEWMA

func (mr *MockPeerstoreMockRecorder) LatencyEWMA(arg0 any) *gomock.Call

LatencyEWMA indicates an expected call of LatencyEWMA.

func (*MockPeerstoreMockRecorder) PeerInfo

func (mr *MockPeerstoreMockRecorder) PeerInfo(arg0 any) *gomock.Call

PeerInfo indicates an expected call of PeerInfo.

func (*MockPeerstoreMockRecorder) Peers

func (mr *MockPeerstoreMockRecorder) Peers() *gomock.Call

Peers indicates an expected call of Peers.

func (*MockPeerstoreMockRecorder) PeersWithAddrs

func (mr *MockPeerstoreMockRecorder) PeersWithAddrs() *gomock.Call

PeersWithAddrs indicates an expected call of PeersWithAddrs.

func (*MockPeerstoreMockRecorder) PeersWithKeys

func (mr *MockPeerstoreMockRecorder) PeersWithKeys() *gomock.Call

PeersWithKeys indicates an expected call of PeersWithKeys.

func (*MockPeerstoreMockRecorder) PrivKey

func (mr *MockPeerstoreMockRecorder) PrivKey(arg0 any) *gomock.Call

PrivKey indicates an expected call of PrivKey.

func (*MockPeerstoreMockRecorder) PubKey

func (mr *MockPeerstoreMockRecorder) PubKey(arg0 any) *gomock.Call

PubKey indicates an expected call of PubKey.

func (*MockPeerstoreMockRecorder) Put

func (mr *MockPeerstoreMockRecorder) Put(p, key, val any) *gomock.Call

Put indicates an expected call of Put.

func (*MockPeerstoreMockRecorder) RecordLatency

func (mr *MockPeerstoreMockRecorder) RecordLatency(arg0, arg1 any) *gomock.Call

RecordLatency indicates an expected call of RecordLatency.

func (*MockPeerstoreMockRecorder) RemovePeer

func (mr *MockPeerstoreMockRecorder) RemovePeer(arg0 any) *gomock.Call

RemovePeer indicates an expected call of RemovePeer.

func (*MockPeerstoreMockRecorder) RemoveProtocols

func (mr *MockPeerstoreMockRecorder) RemoveProtocols(arg0 any, arg1 ...any) *gomock.Call

RemoveProtocols indicates an expected call of RemoveProtocols.

func (*MockPeerstoreMockRecorder) SetAddr

func (mr *MockPeerstoreMockRecorder) SetAddr(p, addr, ttl any) *gomock.Call

SetAddr indicates an expected call of SetAddr.

func (*MockPeerstoreMockRecorder) SetAddrs

func (mr *MockPeerstoreMockRecorder) SetAddrs(p, addrs, ttl any) *gomock.Call

SetAddrs indicates an expected call of SetAddrs.

func (*MockPeerstoreMockRecorder) SetProtocols

func (mr *MockPeerstoreMockRecorder) SetProtocols(arg0 any, arg1 ...any) *gomock.Call

SetProtocols indicates an expected call of SetProtocols.

func (*MockPeerstoreMockRecorder) SupportsProtocols

func (mr *MockPeerstoreMockRecorder) SupportsProtocols(arg0 any, arg1 ...any) *gomock.Call

SupportsProtocols indicates an expected call of SupportsProtocols.

func (*MockPeerstoreMockRecorder) UpdateAddrs

func (mr *MockPeerstoreMockRecorder) UpdateAddrs(p, oldTTL, newTTL any) *gomock.Call

UpdateAddrs indicates an expected call of UpdateAddrs.

type MockPrivKey

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

MockPrivKey is a mock of PrivKey interface.

func NewMockPrivKey

func NewMockPrivKey(ctrl *gomock.Controller) *MockPrivKey

NewMockPrivKey creates a new mock instance.

func (*MockPrivKey) EXPECT

func (m *MockPrivKey) EXPECT() *MockPrivKeyMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPrivKey) Equals

func (m *MockPrivKey) Equals(arg0 crypto.Key) bool

Equals mocks base method.

func (*MockPrivKey) GetPublic

func (m *MockPrivKey) GetPublic() crypto.PubKey

GetPublic mocks base method.

func (*MockPrivKey) Raw

func (m *MockPrivKey) Raw() ([]byte, error)

Raw mocks base method.

func (*MockPrivKey) Sign

func (m *MockPrivKey) Sign(arg0 []byte) ([]byte, error)

Sign mocks base method.

func (*MockPrivKey) Type

func (m *MockPrivKey) Type() pb.KeyType

Type mocks base method.

type MockPrivKeyMockRecorder

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

MockPrivKeyMockRecorder is the mock recorder for MockPrivKey.

func (*MockPrivKeyMockRecorder) Equals

func (mr *MockPrivKeyMockRecorder) Equals(arg0 any) *gomock.Call

Equals indicates an expected call of Equals.

func (*MockPrivKeyMockRecorder) GetPublic

func (mr *MockPrivKeyMockRecorder) GetPublic() *gomock.Call

GetPublic indicates an expected call of GetPublic.

func (*MockPrivKeyMockRecorder) Raw

func (mr *MockPrivKeyMockRecorder) Raw() *gomock.Call

Raw indicates an expected call of Raw.

func (*MockPrivKeyMockRecorder) Sign

func (mr *MockPrivKeyMockRecorder) Sign(arg0 any) *gomock.Call

Sign indicates an expected call of Sign.

func (*MockPrivKeyMockRecorder) Type

func (mr *MockPrivKeyMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type.

type MockProtoBook

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

MockProtoBook is a mock of ProtoBook interface.

func NewMockProtoBook

func NewMockProtoBook(ctrl *gomock.Controller) *MockProtoBook

NewMockProtoBook creates a new mock instance.

func (*MockProtoBook) AddProtocols

func (m *MockProtoBook) AddProtocols(arg0 peer.ID, arg1 ...protocol.ID) error

AddProtocols mocks base method.

func (*MockProtoBook) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockProtoBook) FirstSupportedProtocol

func (m *MockProtoBook) FirstSupportedProtocol(arg0 peer.ID, arg1 ...protocol.ID) (protocol.ID, error)

FirstSupportedProtocol mocks base method.

func (*MockProtoBook) GetProtocols

func (m *MockProtoBook) GetProtocols(arg0 peer.ID) ([]protocol.ID, error)

GetProtocols mocks base method.

func (*MockProtoBook) RemovePeer

func (m *MockProtoBook) RemovePeer(arg0 peer.ID)

RemovePeer mocks base method.

func (*MockProtoBook) RemoveProtocols

func (m *MockProtoBook) RemoveProtocols(arg0 peer.ID, arg1 ...protocol.ID) error

RemoveProtocols mocks base method.

func (*MockProtoBook) SetProtocols

func (m *MockProtoBook) SetProtocols(arg0 peer.ID, arg1 ...protocol.ID) error

SetProtocols mocks base method.

func (*MockProtoBook) SupportsProtocols

func (m *MockProtoBook) SupportsProtocols(arg0 peer.ID, arg1 ...protocol.ID) ([]protocol.ID, error)

SupportsProtocols mocks base method.

type MockProtoBookMockRecorder

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

MockProtoBookMockRecorder is the mock recorder for MockProtoBook.

func (*MockProtoBookMockRecorder) AddProtocols

func (mr *MockProtoBookMockRecorder) AddProtocols(arg0 any, arg1 ...any) *gomock.Call

AddProtocols indicates an expected call of AddProtocols.

func (*MockProtoBookMockRecorder) FirstSupportedProtocol

func (mr *MockProtoBookMockRecorder) FirstSupportedProtocol(arg0 any, arg1 ...any) *gomock.Call

FirstSupportedProtocol indicates an expected call of FirstSupportedProtocol.

func (*MockProtoBookMockRecorder) GetProtocols

func (mr *MockProtoBookMockRecorder) GetProtocols(arg0 any) *gomock.Call

GetProtocols indicates an expected call of GetProtocols.

func (*MockProtoBookMockRecorder) RemovePeer

func (mr *MockProtoBookMockRecorder) RemovePeer(arg0 any) *gomock.Call

RemovePeer indicates an expected call of RemovePeer.

func (*MockProtoBookMockRecorder) RemoveProtocols

func (mr *MockProtoBookMockRecorder) RemoveProtocols(arg0 any, arg1 ...any) *gomock.Call

RemoveProtocols indicates an expected call of RemoveProtocols.

func (*MockProtoBookMockRecorder) SetProtocols

func (mr *MockProtoBookMockRecorder) SetProtocols(arg0 any, arg1 ...any) *gomock.Call

SetProtocols indicates an expected call of SetProtocols.

func (*MockProtoBookMockRecorder) SupportsProtocols

func (mr *MockProtoBookMockRecorder) SupportsProtocols(arg0 any, arg1 ...any) *gomock.Call

SupportsProtocols indicates an expected call of SupportsProtocols.

type MockPubKey

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

MockPubKey is a mock of PubKey interface.

func NewMockPubKey

func NewMockPubKey(ctrl *gomock.Controller) *MockPubKey

NewMockPubKey creates a new mock instance.

func (*MockPubKey) EXPECT

func (m *MockPubKey) EXPECT() *MockPubKeyMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPubKey) Equals

func (m *MockPubKey) Equals(arg0 crypto.Key) bool

Equals mocks base method.

func (*MockPubKey) Raw

func (m *MockPubKey) Raw() ([]byte, error)

Raw mocks base method.

func (*MockPubKey) Type

func (m *MockPubKey) Type() pb.KeyType

Type mocks base method.

func (*MockPubKey) Verify

func (m *MockPubKey) Verify(data, sig []byte) (bool, error)

Verify mocks base method.

type MockPubKeyMockRecorder

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

MockPubKeyMockRecorder is the mock recorder for MockPubKey.

func (*MockPubKeyMockRecorder) Equals

func (mr *MockPubKeyMockRecorder) Equals(arg0 any) *gomock.Call

Equals indicates an expected call of Equals.

func (*MockPubKeyMockRecorder) Raw

func (mr *MockPubKeyMockRecorder) Raw() *gomock.Call

Raw indicates an expected call of Raw.

func (*MockPubKeyMockRecorder) Type

func (mr *MockPubKeyMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type.

func (*MockPubKeyMockRecorder) Verify

func (mr *MockPubKeyMockRecorder) Verify(data, sig any) *gomock.Call

Verify indicates an expected call of Verify.

type MockReporter

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

MockReporter is a mock of Reporter interface.

func NewMockReporter

func NewMockReporter(ctrl *gomock.Controller) *MockReporter

NewMockReporter creates a new mock instance.

func (*MockReporter) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockReporter) GetBandwidthByPeer

func (m *MockReporter) GetBandwidthByPeer() map[peer.ID]metrics.Stats

GetBandwidthByPeer mocks base method.

func (*MockReporter) GetBandwidthByProtocol

func (m *MockReporter) GetBandwidthByProtocol() map[protocol.ID]metrics.Stats

GetBandwidthByProtocol mocks base method.

func (*MockReporter) GetBandwidthForPeer

func (m *MockReporter) GetBandwidthForPeer(arg0 peer.ID) metrics.Stats

GetBandwidthForPeer mocks base method.

func (*MockReporter) GetBandwidthForProtocol

func (m *MockReporter) GetBandwidthForProtocol(arg0 protocol.ID) metrics.Stats

GetBandwidthForProtocol mocks base method.

func (*MockReporter) GetBandwidthTotals

func (m *MockReporter) GetBandwidthTotals() metrics.Stats

GetBandwidthTotals mocks base method.

func (*MockReporter) LogRecvMessage

func (m *MockReporter) LogRecvMessage(arg0 int64)

LogRecvMessage mocks base method.

func (*MockReporter) LogRecvMessageStream

func (m *MockReporter) LogRecvMessageStream(arg0 int64, arg1 protocol.ID, arg2 peer.ID)

LogRecvMessageStream mocks base method.

func (*MockReporter) LogSentMessage

func (m *MockReporter) LogSentMessage(arg0 int64)

LogSentMessage mocks base method.

func (*MockReporter) LogSentMessageStream

func (m *MockReporter) LogSentMessageStream(arg0 int64, arg1 protocol.ID, arg2 peer.ID)

LogSentMessageStream mocks base method.

type MockReporterMockRecorder

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

MockReporterMockRecorder is the mock recorder for MockReporter.

func (*MockReporterMockRecorder) GetBandwidthByPeer

func (mr *MockReporterMockRecorder) GetBandwidthByPeer() *gomock.Call

GetBandwidthByPeer indicates an expected call of GetBandwidthByPeer.

func (*MockReporterMockRecorder) GetBandwidthByProtocol

func (mr *MockReporterMockRecorder) GetBandwidthByProtocol() *gomock.Call

GetBandwidthByProtocol indicates an expected call of GetBandwidthByProtocol.

func (*MockReporterMockRecorder) GetBandwidthForPeer

func (mr *MockReporterMockRecorder) GetBandwidthForPeer(arg0 any) *gomock.Call

GetBandwidthForPeer indicates an expected call of GetBandwidthForPeer.

func (*MockReporterMockRecorder) GetBandwidthForProtocol

func (mr *MockReporterMockRecorder) GetBandwidthForProtocol(arg0 any) *gomock.Call

GetBandwidthForProtocol indicates an expected call of GetBandwidthForProtocol.

func (*MockReporterMockRecorder) GetBandwidthTotals

func (mr *MockReporterMockRecorder) GetBandwidthTotals() *gomock.Call

GetBandwidthTotals indicates an expected call of GetBandwidthTotals.

func (*MockReporterMockRecorder) LogRecvMessage

func (mr *MockReporterMockRecorder) LogRecvMessage(arg0 any) *gomock.Call

LogRecvMessage indicates an expected call of LogRecvMessage.

func (*MockReporterMockRecorder) LogRecvMessageStream

func (mr *MockReporterMockRecorder) LogRecvMessageStream(arg0, arg1, arg2 any) *gomock.Call

LogRecvMessageStream indicates an expected call of LogRecvMessageStream.

func (*MockReporterMockRecorder) LogSentMessage

func (mr *MockReporterMockRecorder) LogSentMessage(arg0 any) *gomock.Call

LogSentMessage indicates an expected call of LogSentMessage.

func (*MockReporterMockRecorder) LogSentMessageStream

func (mr *MockReporterMockRecorder) LogSentMessageStream(arg0, arg1, arg2 any) *gomock.Call

LogSentMessageStream indicates an expected call of LogSentMessageStream.

type MockStream

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

MockStream is a mock of Stream interface.

func NewMockStream

func NewMockStream(ctrl *gomock.Controller) *MockStream

NewMockStream creates a new mock instance.

func (*MockStream) Close

func (m *MockStream) Close() error

Close mocks base method.

func (*MockStream) CloseRead

func (m *MockStream) CloseRead() error

CloseRead mocks base method.

func (*MockStream) CloseWrite

func (m *MockStream) CloseWrite() error

CloseWrite mocks base method.

func (*MockStream) Conn

func (m *MockStream) Conn() network.Conn

Conn mocks base method.

func (*MockStream) EXPECT

func (m *MockStream) EXPECT() *MockStreamMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockStream) ID

func (m *MockStream) ID() string

ID mocks base method.

func (*MockStream) Protocol

func (m *MockStream) Protocol() protocol.ID

Protocol mocks base method.

func (*MockStream) Read

func (m *MockStream) Read(p []byte) (int, error)

Read mocks base method.

func (*MockStream) Reset

func (m *MockStream) Reset() error

Reset mocks base method.

func (*MockStream) Scope

func (m *MockStream) Scope() network.StreamScope

Scope mocks base method.

func (*MockStream) SetDeadline

func (m *MockStream) SetDeadline(arg0 time.Time) error

SetDeadline mocks base method.

func (*MockStream) SetProtocol

func (m *MockStream) SetProtocol(id protocol.ID) error

SetProtocol mocks base method.

func (*MockStream) SetReadDeadline

func (m *MockStream) SetReadDeadline(arg0 time.Time) error

SetReadDeadline mocks base method.

func (*MockStream) SetWriteDeadline

func (m *MockStream) SetWriteDeadline(arg0 time.Time) error

SetWriteDeadline mocks base method.

func (*MockStream) Stat

func (m *MockStream) Stat() network.Stats

Stat mocks base method.

func (*MockStream) Write

func (m *MockStream) Write(p []byte) (int, error)

Write mocks base method.

type MockStreamMockRecorder

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

MockStreamMockRecorder is the mock recorder for MockStream.

func (*MockStreamMockRecorder) Close

func (mr *MockStreamMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockStreamMockRecorder) CloseRead

func (mr *MockStreamMockRecorder) CloseRead() *gomock.Call

CloseRead indicates an expected call of CloseRead.

func (*MockStreamMockRecorder) CloseWrite

func (mr *MockStreamMockRecorder) CloseWrite() *gomock.Call

CloseWrite indicates an expected call of CloseWrite.

func (*MockStreamMockRecorder) Conn

func (mr *MockStreamMockRecorder) Conn() *gomock.Call

Conn indicates an expected call of Conn.

func (*MockStreamMockRecorder) ID

ID indicates an expected call of ID.

func (*MockStreamMockRecorder) Protocol

func (mr *MockStreamMockRecorder) Protocol() *gomock.Call

Protocol indicates an expected call of Protocol.

func (*MockStreamMockRecorder) Read

func (mr *MockStreamMockRecorder) Read(p any) *gomock.Call

Read indicates an expected call of Read.

func (*MockStreamMockRecorder) Reset

func (mr *MockStreamMockRecorder) Reset() *gomock.Call

Reset indicates an expected call of Reset.

func (*MockStreamMockRecorder) Scope

func (mr *MockStreamMockRecorder) Scope() *gomock.Call

Scope indicates an expected call of Scope.

func (*MockStreamMockRecorder) SetDeadline

func (mr *MockStreamMockRecorder) SetDeadline(arg0 any) *gomock.Call

SetDeadline indicates an expected call of SetDeadline.

func (*MockStreamMockRecorder) SetProtocol

func (mr *MockStreamMockRecorder) SetProtocol(id any) *gomock.Call

SetProtocol indicates an expected call of SetProtocol.

func (*MockStreamMockRecorder) SetReadDeadline

func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 any) *gomock.Call

SetReadDeadline indicates an expected call of SetReadDeadline.

func (*MockStreamMockRecorder) SetWriteDeadline

func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call

SetWriteDeadline indicates an expected call of SetWriteDeadline.

func (*MockStreamMockRecorder) Stat

func (mr *MockStreamMockRecorder) Stat() *gomock.Call

Stat indicates an expected call of Stat.

func (*MockStreamMockRecorder) Write

func (mr *MockStreamMockRecorder) Write(p any) *gomock.Call

Write indicates an expected call of Write.

type MuxedStream

type MuxedStream interface {
	io.Reader
	io.Writer

	// Close closes the stream.
	//
	// * Any buffered data for writing will be flushed.
	// * Future reads will fail.
	// * Any in-progress reads/writes will be interrupted.
	//
	// Close may be asynchronous and _does not_ guarantee receipt of the
	// data.
	//
	// Close closes the stream for both reading and writing.
	// Close is equivalent to calling `CloseRead` and `CloseWrite`. Importantly, Close will not wait for any form of acknowledgment.
	// If acknowledgment is required, the caller must call `CloseWrite`, then wait on the stream for a response (or an EOF),
	// then call Close() to free the stream object.
	//
	// When done with a stream, the user must call either Close() or `Reset()` to discard the stream, even after calling `CloseRead` and/or `CloseWrite`.
	io.Closer

	// CloseWrite closes the stream for writing but leaves it open for
	// reading.
	//
	// CloseWrite does not free the stream, users must still call Close or
	// Reset.
	CloseWrite() error

	// CloseRead closes the stream for reading but leaves it open for
	// writing.
	//
	// When CloseRead is called, all in-progress Read calls are interrupted with a non-EOF error and
	// no further calls to Read will succeed.
	//
	// The handling of new incoming data on the stream after calling this function is implementation defined.
	//
	// CloseRead does not free the stream, users must still call Close or
	// Reset.
	CloseRead() error

	// Reset closes both ends of the stream. Use this to tell the remote
	// side to hang up and go away.
	Reset() error

	SetDeadline(time.Time) error
	SetReadDeadline(time.Time) error
	SetWriteDeadline(time.Time) error
}

type Stream

type Stream interface {
	MuxedStream

	// ID returns an identifier that uniquely identifies this Stream within this
	// host, during this run. Stream IDs may repeat across restarts.
	ID() string

	Protocol() protocol.ID
	SetProtocol(id protocol.ID) error

	// Stat returns metadata pertaining to this stream.
	Stat() network.Stats

	// Conn returns the connection this stream is part of.
	Conn() network.Conn

	// Scope returns the user's view of this stream's resource scope
	Scope() network.StreamScope
}

Jump to

Keyboard shortcuts

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