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 ¶
- type MockAddrBook
- func (m *MockAddrBook) AddAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockAddrBook) AddAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockAddrBook) AddrStream(arg0 context.Context, arg1 peer.ID) <-chan multiaddr.Multiaddr
- func (m *MockAddrBook) Addrs(p peer.ID) []multiaddr.Multiaddr
- func (m *MockAddrBook) ClearAddrs(p peer.ID)
- func (m *MockAddrBook) EXPECT() *MockAddrBookMockRecorder
- func (m *MockAddrBook) PeersWithAddrs() peer.IDSlice
- func (m *MockAddrBook) SetAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockAddrBook) SetAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockAddrBook) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Duration)
- type MockAddrBookMockRecorder
- func (mr *MockAddrBookMockRecorder) AddAddr(p, addr, ttl any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) AddAddrs(p, addrs, ttl any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) AddrStream(arg0, arg1 any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) Addrs(p any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) ClearAddrs(p any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) PeersWithAddrs() *gomock.Call
- func (mr *MockAddrBookMockRecorder) SetAddr(p, addr, ttl any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) SetAddrs(p, addrs, ttl any) *gomock.Call
- func (mr *MockAddrBookMockRecorder) UpdateAddrs(p, oldTTL, newTTL any) *gomock.Call
- type MockCertifiedAddrBook
- type MockCertifiedAddrBookMockRecorder
- type MockConn
- func (m *MockConn) Close() error
- func (m *MockConn) ConnState() network.ConnectionState
- func (m *MockConn) EXPECT() *MockConnMockRecorder
- func (m *MockConn) GetStreams() []network.Stream
- func (m *MockConn) ID() string
- func (m *MockConn) IsClosed() bool
- func (m *MockConn) LocalMultiaddr() multiaddr.Multiaddr
- func (m *MockConn) LocalPeer() peer.ID
- func (m *MockConn) NewStream(arg0 context.Context) (network.Stream, error)
- func (m *MockConn) RemoteMultiaddr() multiaddr.Multiaddr
- func (m *MockConn) RemotePeer() peer.ID
- func (m *MockConn) RemotePublicKey() crypto.PubKey
- func (m *MockConn) Scope() network.ConnScope
- func (m *MockConn) Stat() network.ConnStats
- type MockConnMockRecorder
- func (mr *MockConnMockRecorder) Close() *gomock.Call
- func (mr *MockConnMockRecorder) ConnState() *gomock.Call
- func (mr *MockConnMockRecorder) GetStreams() *gomock.Call
- func (mr *MockConnMockRecorder) ID() *gomock.Call
- func (mr *MockConnMockRecorder) IsClosed() *gomock.Call
- func (mr *MockConnMockRecorder) LocalMultiaddr() *gomock.Call
- func (mr *MockConnMockRecorder) LocalPeer() *gomock.Call
- func (mr *MockConnMockRecorder) NewStream(arg0 any) *gomock.Call
- func (mr *MockConnMockRecorder) RemoteMultiaddr() *gomock.Call
- func (mr *MockConnMockRecorder) RemotePeer() *gomock.Call
- func (mr *MockConnMockRecorder) RemotePublicKey() *gomock.Call
- func (mr *MockConnMockRecorder) Scope() *gomock.Call
- func (mr *MockConnMockRecorder) Stat() *gomock.Call
- type MockConnMultiaddrs
- type MockConnMultiaddrsMockRecorder
- type MockConnScoper
- type MockConnScoperMockRecorder
- type MockConnSecurity
- type MockConnSecurityMockRecorder
- type MockConnStat
- type MockConnStatMockRecorder
- type MockDialer
- func (m *MockDialer) ClosePeer(arg0 peer.ID) error
- func (m *MockDialer) Connectedness(arg0 peer.ID) network.Connectedness
- func (m *MockDialer) Conns() []network.Conn
- func (m *MockDialer) ConnsToPeer(p peer.ID) []network.Conn
- func (m *MockDialer) DialPeer(arg0 context.Context, arg1 peer.ID) (network.Conn, error)
- func (m *MockDialer) EXPECT() *MockDialerMockRecorder
- func (m *MockDialer) LocalPeer() peer.ID
- func (m *MockDialer) Notify(arg0 network.Notifiee)
- func (m *MockDialer) Peers() []peer.ID
- func (m *MockDialer) Peerstore() peerstore.Peerstore
- func (m *MockDialer) StopNotify(arg0 network.Notifiee)
- type MockDialerMockRecorder
- func (mr *MockDialerMockRecorder) ClosePeer(arg0 any) *gomock.Call
- func (mr *MockDialerMockRecorder) Connectedness(arg0 any) *gomock.Call
- func (mr *MockDialerMockRecorder) Conns() *gomock.Call
- func (mr *MockDialerMockRecorder) ConnsToPeer(p any) *gomock.Call
- func (mr *MockDialerMockRecorder) DialPeer(arg0, arg1 any) *gomock.Call
- func (mr *MockDialerMockRecorder) LocalPeer() *gomock.Call
- func (mr *MockDialerMockRecorder) Notify(arg0 any) *gomock.Call
- func (mr *MockDialerMockRecorder) Peers() *gomock.Call
- func (mr *MockDialerMockRecorder) Peerstore() *gomock.Call
- func (mr *MockDialerMockRecorder) StopNotify(arg0 any) *gomock.Call
- type MockHost
- func (m *MockHost) Addrs() []multiaddr.Multiaddr
- func (m *MockHost) Close() error
- func (m *MockHost) ConnManager() connmgr.ConnManager
- func (m *MockHost) Connect(ctx context.Context, pi peer.AddrInfo) error
- func (m *MockHost) EXPECT() *MockHostMockRecorder
- func (m *MockHost) EventBus() event.Bus
- func (m *MockHost) ID() peer.ID
- func (m *MockHost) Mux() protocol.Switch
- func (m *MockHost) Network() network.Network
- func (m *MockHost) NewStream(ctx context.Context, p peer.ID, pids ...protocol.ID) (network.Stream, error)
- func (m *MockHost) Peerstore() peerstore.Peerstore
- func (m *MockHost) RemoveStreamHandler(pid protocol.ID)
- func (m *MockHost) SetStreamHandler(pid protocol.ID, handler network.StreamHandler)
- func (m *MockHost) SetStreamHandlerMatch(arg0 protocol.ID, arg1 func(protocol.ID) bool, arg2 network.StreamHandler)
- type MockHostMockRecorder
- func (mr *MockHostMockRecorder) Addrs() *gomock.Call
- func (mr *MockHostMockRecorder) Close() *gomock.Call
- func (mr *MockHostMockRecorder) ConnManager() *gomock.Call
- func (mr *MockHostMockRecorder) Connect(ctx, pi any) *gomock.Call
- func (mr *MockHostMockRecorder) EventBus() *gomock.Call
- func (mr *MockHostMockRecorder) ID() *gomock.Call
- func (mr *MockHostMockRecorder) Mux() *gomock.Call
- func (mr *MockHostMockRecorder) Network() *gomock.Call
- func (mr *MockHostMockRecorder) NewStream(ctx, p any, pids ...any) *gomock.Call
- func (mr *MockHostMockRecorder) Peerstore() *gomock.Call
- func (mr *MockHostMockRecorder) RemoveStreamHandler(pid any) *gomock.Call
- func (mr *MockHostMockRecorder) SetStreamHandler(pid, handler any) *gomock.Call
- func (mr *MockHostMockRecorder) SetStreamHandlerMatch(arg0, arg1, arg2 any) *gomock.Call
- type MockKey
- type MockKeyBook
- func (m *MockKeyBook) AddPrivKey(arg0 peer.ID, arg1 crypto.PrivKey) error
- func (m *MockKeyBook) AddPubKey(arg0 peer.ID, arg1 crypto.PubKey) error
- func (m *MockKeyBook) EXPECT() *MockKeyBookMockRecorder
- func (m *MockKeyBook) PeersWithKeys() peer.IDSlice
- func (m *MockKeyBook) PrivKey(arg0 peer.ID) crypto.PrivKey
- func (m *MockKeyBook) PubKey(arg0 peer.ID) crypto.PubKey
- func (m *MockKeyBook) RemovePeer(arg0 peer.ID)
- type MockKeyBookMockRecorder
- func (mr *MockKeyBookMockRecorder) AddPrivKey(arg0, arg1 any) *gomock.Call
- func (mr *MockKeyBookMockRecorder) AddPubKey(arg0, arg1 any) *gomock.Call
- func (mr *MockKeyBookMockRecorder) PeersWithKeys() *gomock.Call
- func (mr *MockKeyBookMockRecorder) PrivKey(arg0 any) *gomock.Call
- func (mr *MockKeyBookMockRecorder) PubKey(arg0 any) *gomock.Call
- func (mr *MockKeyBookMockRecorder) RemovePeer(arg0 any) *gomock.Call
- type MockKeyMockRecorder
- type MockMetrics
- type MockMetricsMockRecorder
- type MockMuxedStream
- func (m *MockMuxedStream) Close() error
- func (m *MockMuxedStream) CloseRead() error
- func (m *MockMuxedStream) CloseWrite() error
- func (m *MockMuxedStream) EXPECT() *MockMuxedStreamMockRecorder
- func (m *MockMuxedStream) Read(p []byte) (int, error)
- func (m *MockMuxedStream) Reset() error
- func (m *MockMuxedStream) SetDeadline(arg0 time.Time) error
- func (m *MockMuxedStream) SetReadDeadline(arg0 time.Time) error
- func (m *MockMuxedStream) SetWriteDeadline(arg0 time.Time) error
- func (m *MockMuxedStream) Write(p []byte) (int, error)
- type MockMuxedStreamMockRecorder
- func (mr *MockMuxedStreamMockRecorder) Close() *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) CloseRead() *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) CloseWrite() *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) Read(p any) *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) Reset() *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) SetDeadline(arg0 any) *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) SetReadDeadline(arg0 any) *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call
- func (mr *MockMuxedStreamMockRecorder) Write(p any) *gomock.Call
- type MockNetwork
- func (m *MockNetwork) Close() error
- func (m *MockNetwork) ClosePeer(arg0 peer.ID) error
- func (m *MockNetwork) Connectedness(arg0 peer.ID) network.Connectedness
- func (m *MockNetwork) Conns() []network.Conn
- func (m *MockNetwork) ConnsToPeer(p peer.ID) []network.Conn
- func (m *MockNetwork) DialPeer(arg0 context.Context, arg1 peer.ID) (network.Conn, error)
- func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder
- func (m *MockNetwork) InterfaceListenAddresses() ([]multiaddr.Multiaddr, error)
- func (m *MockNetwork) Listen(arg0 ...multiaddr.Multiaddr) error
- func (m *MockNetwork) ListenAddresses() []multiaddr.Multiaddr
- func (m *MockNetwork) LocalPeer() peer.ID
- func (m *MockNetwork) NewStream(arg0 context.Context, arg1 peer.ID) (network.Stream, error)
- func (m *MockNetwork) Notify(arg0 network.Notifiee)
- func (m *MockNetwork) Peers() []peer.ID
- func (m *MockNetwork) Peerstore() peerstore.Peerstore
- func (m *MockNetwork) ResourceManager() network.ResourceManager
- func (m *MockNetwork) SetStreamHandler(arg0 network.StreamHandler)
- func (m *MockNetwork) StopNotify(arg0 network.Notifiee)
- type MockNetworkMockRecorder
- func (mr *MockNetworkMockRecorder) Close() *gomock.Call
- func (mr *MockNetworkMockRecorder) ClosePeer(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) Connectedness(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) Conns() *gomock.Call
- func (mr *MockNetworkMockRecorder) ConnsToPeer(p any) *gomock.Call
- func (mr *MockNetworkMockRecorder) DialPeer(arg0, arg1 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) InterfaceListenAddresses() *gomock.Call
- func (mr *MockNetworkMockRecorder) Listen(arg0 ...any) *gomock.Call
- func (mr *MockNetworkMockRecorder) ListenAddresses() *gomock.Call
- func (mr *MockNetworkMockRecorder) LocalPeer() *gomock.Call
- func (mr *MockNetworkMockRecorder) NewStream(arg0, arg1 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) Notify(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) Peers() *gomock.Call
- func (mr *MockNetworkMockRecorder) Peerstore() *gomock.Call
- func (mr *MockNetworkMockRecorder) ResourceManager() *gomock.Call
- func (mr *MockNetworkMockRecorder) SetStreamHandler(arg0 any) *gomock.Call
- func (mr *MockNetworkMockRecorder) StopNotify(arg0 any) *gomock.Call
- type MockPeerMetadata
- type MockPeerMetadataMockRecorder
- type MockPeerstore
- func (m *MockPeerstore) AddAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockPeerstore) AddAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockPeerstore) AddPrivKey(arg0 peer.ID, arg1 crypto.PrivKey) error
- func (m *MockPeerstore) AddProtocols(arg0 peer.ID, arg1 ...protocol.ID) error
- func (m *MockPeerstore) AddPubKey(arg0 peer.ID, arg1 crypto.PubKey) error
- func (m *MockPeerstore) AddrStream(arg0 context.Context, arg1 peer.ID) <-chan multiaddr.Multiaddr
- func (m *MockPeerstore) Addrs(p peer.ID) []multiaddr.Multiaddr
- func (m *MockPeerstore) ClearAddrs(p peer.ID)
- func (m *MockPeerstore) Close() error
- func (m *MockPeerstore) EXPECT() *MockPeerstoreMockRecorder
- func (m *MockPeerstore) FirstSupportedProtocol(arg0 peer.ID, arg1 ...protocol.ID) (protocol.ID, error)
- func (m *MockPeerstore) Get(p peer.ID, key string) (any, error)
- func (m *MockPeerstore) GetProtocols(arg0 peer.ID) ([]protocol.ID, error)
- func (m *MockPeerstore) LatencyEWMA(arg0 peer.ID) time.Duration
- func (m *MockPeerstore) PeerInfo(arg0 peer.ID) peer.AddrInfo
- func (m *MockPeerstore) Peers() peer.IDSlice
- func (m *MockPeerstore) PeersWithAddrs() peer.IDSlice
- func (m *MockPeerstore) PeersWithKeys() peer.IDSlice
- func (m *MockPeerstore) PrivKey(arg0 peer.ID) crypto.PrivKey
- func (m *MockPeerstore) PubKey(arg0 peer.ID) crypto.PubKey
- func (m *MockPeerstore) Put(p peer.ID, key string, val any) error
- func (m *MockPeerstore) RecordLatency(arg0 peer.ID, arg1 time.Duration)
- func (m *MockPeerstore) RemovePeer(arg0 peer.ID)
- func (m *MockPeerstore) RemoveProtocols(arg0 peer.ID, arg1 ...protocol.ID) error
- func (m *MockPeerstore) SetAddr(p peer.ID, addr multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockPeerstore) SetAddrs(p peer.ID, addrs []multiaddr.Multiaddr, ttl time.Duration)
- func (m *MockPeerstore) SetProtocols(arg0 peer.ID, arg1 ...protocol.ID) error
- func (m *MockPeerstore) SupportsProtocols(arg0 peer.ID, arg1 ...protocol.ID) ([]protocol.ID, error)
- func (m *MockPeerstore) UpdateAddrs(p peer.ID, oldTTL, newTTL time.Duration)
- type MockPeerstoreMockRecorder
- func (mr *MockPeerstoreMockRecorder) AddAddr(p, addr, ttl any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) AddAddrs(p, addrs, ttl any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) AddPrivKey(arg0, arg1 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) AddProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) AddPubKey(arg0, arg1 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) AddrStream(arg0, arg1 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) Addrs(p any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) ClearAddrs(p any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) Close() *gomock.Call
- func (mr *MockPeerstoreMockRecorder) FirstSupportedProtocol(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) Get(p, key any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) GetProtocols(arg0 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) LatencyEWMA(arg0 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) PeerInfo(arg0 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) Peers() *gomock.Call
- func (mr *MockPeerstoreMockRecorder) PeersWithAddrs() *gomock.Call
- func (mr *MockPeerstoreMockRecorder) PeersWithKeys() *gomock.Call
- func (mr *MockPeerstoreMockRecorder) PrivKey(arg0 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) PubKey(arg0 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) Put(p, key, val any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) RecordLatency(arg0, arg1 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) RemovePeer(arg0 any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) RemoveProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) SetAddr(p, addr, ttl any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) SetAddrs(p, addrs, ttl any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) SetProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) SupportsProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockPeerstoreMockRecorder) UpdateAddrs(p, oldTTL, newTTL any) *gomock.Call
- type MockPrivKey
- type MockPrivKeyMockRecorder
- type MockProtoBook
- func (m *MockProtoBook) AddProtocols(arg0 peer.ID, arg1 ...protocol.ID) error
- func (m *MockProtoBook) EXPECT() *MockProtoBookMockRecorder
- func (m *MockProtoBook) FirstSupportedProtocol(arg0 peer.ID, arg1 ...protocol.ID) (protocol.ID, error)
- func (m *MockProtoBook) GetProtocols(arg0 peer.ID) ([]protocol.ID, error)
- func (m *MockProtoBook) RemovePeer(arg0 peer.ID)
- func (m *MockProtoBook) RemoveProtocols(arg0 peer.ID, arg1 ...protocol.ID) error
- func (m *MockProtoBook) SetProtocols(arg0 peer.ID, arg1 ...protocol.ID) error
- func (m *MockProtoBook) SupportsProtocols(arg0 peer.ID, arg1 ...protocol.ID) ([]protocol.ID, error)
- type MockProtoBookMockRecorder
- func (mr *MockProtoBookMockRecorder) AddProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockProtoBookMockRecorder) FirstSupportedProtocol(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockProtoBookMockRecorder) GetProtocols(arg0 any) *gomock.Call
- func (mr *MockProtoBookMockRecorder) RemovePeer(arg0 any) *gomock.Call
- func (mr *MockProtoBookMockRecorder) RemoveProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockProtoBookMockRecorder) SetProtocols(arg0 any, arg1 ...any) *gomock.Call
- func (mr *MockProtoBookMockRecorder) SupportsProtocols(arg0 any, arg1 ...any) *gomock.Call
- type MockPubKey
- type MockPubKeyMockRecorder
- type MockReporter
- func (m *MockReporter) EXPECT() *MockReporterMockRecorder
- func (m *MockReporter) GetBandwidthByPeer() map[peer.ID]metrics.Stats
- func (m *MockReporter) GetBandwidthByProtocol() map[protocol.ID]metrics.Stats
- func (m *MockReporter) GetBandwidthForPeer(arg0 peer.ID) metrics.Stats
- func (m *MockReporter) GetBandwidthForProtocol(arg0 protocol.ID) metrics.Stats
- func (m *MockReporter) GetBandwidthTotals() metrics.Stats
- func (m *MockReporter) LogRecvMessage(arg0 int64)
- func (m *MockReporter) LogRecvMessageStream(arg0 int64, arg1 protocol.ID, arg2 peer.ID)
- func (m *MockReporter) LogSentMessage(arg0 int64)
- func (m *MockReporter) LogSentMessageStream(arg0 int64, arg1 protocol.ID, arg2 peer.ID)
- type MockReporterMockRecorder
- func (mr *MockReporterMockRecorder) GetBandwidthByPeer() *gomock.Call
- func (mr *MockReporterMockRecorder) GetBandwidthByProtocol() *gomock.Call
- func (mr *MockReporterMockRecorder) GetBandwidthForPeer(arg0 any) *gomock.Call
- func (mr *MockReporterMockRecorder) GetBandwidthForProtocol(arg0 any) *gomock.Call
- func (mr *MockReporterMockRecorder) GetBandwidthTotals() *gomock.Call
- func (mr *MockReporterMockRecorder) LogRecvMessage(arg0 any) *gomock.Call
- func (mr *MockReporterMockRecorder) LogRecvMessageStream(arg0, arg1, arg2 any) *gomock.Call
- func (mr *MockReporterMockRecorder) LogSentMessage(arg0 any) *gomock.Call
- func (mr *MockReporterMockRecorder) LogSentMessageStream(arg0, arg1, arg2 any) *gomock.Call
- type MockStream
- func (m *MockStream) Close() error
- func (m *MockStream) CloseRead() error
- func (m *MockStream) CloseWrite() error
- func (m *MockStream) Conn() network.Conn
- func (m *MockStream) EXPECT() *MockStreamMockRecorder
- func (m *MockStream) ID() string
- func (m *MockStream) Protocol() protocol.ID
- func (m *MockStream) Read(p []byte) (int, error)
- func (m *MockStream) Reset() error
- func (m *MockStream) Scope() network.StreamScope
- func (m *MockStream) SetDeadline(arg0 time.Time) error
- func (m *MockStream) SetProtocol(id protocol.ID) error
- func (m *MockStream) SetReadDeadline(arg0 time.Time) error
- func (m *MockStream) SetWriteDeadline(arg0 time.Time) error
- func (m *MockStream) Stat() network.Stats
- func (m *MockStream) Write(p []byte) (int, error)
- type MockStreamMockRecorder
- func (mr *MockStreamMockRecorder) Close() *gomock.Call
- func (mr *MockStreamMockRecorder) CloseRead() *gomock.Call
- func (mr *MockStreamMockRecorder) CloseWrite() *gomock.Call
- func (mr *MockStreamMockRecorder) Conn() *gomock.Call
- func (mr *MockStreamMockRecorder) ID() *gomock.Call
- func (mr *MockStreamMockRecorder) Protocol() *gomock.Call
- func (mr *MockStreamMockRecorder) Read(p any) *gomock.Call
- func (mr *MockStreamMockRecorder) Reset() *gomock.Call
- func (mr *MockStreamMockRecorder) Scope() *gomock.Call
- func (mr *MockStreamMockRecorder) SetDeadline(arg0 any) *gomock.Call
- func (mr *MockStreamMockRecorder) SetProtocol(id any) *gomock.Call
- func (mr *MockStreamMockRecorder) SetReadDeadline(arg0 any) *gomock.Call
- func (mr *MockStreamMockRecorder) SetWriteDeadline(arg0 any) *gomock.Call
- func (mr *MockStreamMockRecorder) Stat() *gomock.Call
- func (mr *MockStreamMockRecorder) Write(p any) *gomock.Call
- type MuxedStream
- type Stream
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) AddrStream ¶
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 ¶
func (m *MockAddrBook) EXPECT() *MockAddrBookMockRecorder
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) 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 ¶
func (m *MockCertifiedAddrBook) EXPECT() *MockCertifiedAddrBookMockRecorder
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) 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 ¶
GetStreams mocks base method.
func (*MockConn) LocalMultiaddr ¶
LocalMultiaddr mocks base method.
func (*MockConn) RemoteMultiaddr ¶
RemoteMultiaddr mocks base method.
func (*MockConn) RemotePublicKey ¶
RemotePublicKey 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 ¶
func (m *MockConnMultiaddrs) EXPECT() *MockConnMultiaddrsMockRecorder
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 ¶
func (m *MockConnScoper) EXPECT() *MockConnScoperMockRecorder
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 ¶
func (m *MockConnSecurity) EXPECT() *MockConnSecurityMockRecorder
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 ¶
func (m *MockConnStat) EXPECT() *MockConnStatMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
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) ConnsToPeer ¶
func (m *MockDialer) ConnsToPeer(p peer.ID) []network.Conn
ConnsToPeer 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) 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) ConnManager ¶
func (m *MockHost) ConnManager() connmgr.ConnManager
ConnManager 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) NewStream ¶
func (m *MockHost) NewStream(ctx context.Context, p peer.ID, pids ...protocol.ID) (network.Stream, error)
NewStream mocks base method.
func (*MockHost) RemoveStreamHandler ¶
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.
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 ¶
AddPrivKey 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) 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 ¶
func (m *MockMuxedStream) EXPECT() *MockMuxedStreamMockRecorder
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) 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.
type MockMuxedStreamMockRecorder ¶
type MockMuxedStreamMockRecorder struct {
// contains filtered or unexported fields
}
MockMuxedStreamMockRecorder is the mock recorder for MockMuxedStream.
func (*MockMuxedStreamMockRecorder) Close ¶
func (mr *MockMuxedStreamMockRecorder) Close() *gomock.Call
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 ¶
func (mr *MockMuxedStreamMockRecorder) Read(p any) *gomock.Call
Read indicates an expected call of Read.
func (*MockMuxedStreamMockRecorder) Reset ¶
func (mr *MockMuxedStreamMockRecorder) Reset() *gomock.Call
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.
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) 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) ConnsToPeer ¶
func (m *MockNetwork) ConnsToPeer(p peer.ID) []network.Conn
ConnsToPeer 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) Notify ¶
func (m *MockNetwork) Notify(arg0 network.Notifiee)
Notify 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 ¶
func (m *MockPeerMetadata) EXPECT() *MockPeerMetadataMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
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) AddPrivKey ¶
AddPrivKey mocks base method.
func (*MockPeerstore) AddProtocols ¶
AddProtocols mocks base method.
func (*MockPeerstore) AddrStream ¶
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) EXPECT ¶
func (m *MockPeerstore) EXPECT() *MockPeerstoreMockRecorder
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) GetProtocols ¶
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) 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) 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 ¶
RemoveProtocols mocks base method.
func (*MockPeerstore) SetProtocols ¶
SetProtocols mocks base method.
func (*MockPeerstore) SupportsProtocols ¶
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.
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 ¶
AddProtocols mocks base method.
func (*MockProtoBook) EXPECT ¶
func (m *MockProtoBook) EXPECT() *MockProtoBookMockRecorder
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 ¶
GetProtocols mocks base method.
func (*MockProtoBook) RemovePeer ¶
func (m *MockProtoBook) RemovePeer(arg0 peer.ID)
RemovePeer mocks base method.
func (*MockProtoBook) RemoveProtocols ¶
RemoveProtocols mocks base method.
func (*MockProtoBook) SetProtocols ¶
SetProtocols mocks base method.
func (*MockProtoBook) SupportsProtocols ¶
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.
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.
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 ¶
func (m *MockReporter) EXPECT() *MockReporterMockRecorder
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 ¶
LogRecvMessageStream mocks base method.
func (*MockReporter) LogSentMessage ¶
func (m *MockReporter) LogSentMessage(arg0 int64)
LogSentMessage mocks base method.
func (*MockReporter) LogSentMessageStream ¶
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) CloseWrite ¶
func (m *MockStream) CloseWrite() error
CloseWrite 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) Protocol ¶
func (m *MockStream) Protocol() protocol.ID
Protocol 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.
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 ¶
func (mr *MockStreamMockRecorder) ID() *gomock.Call
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.
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 }