Documentation ¶
Overview ¶
Package networkmock is a generated GoMock package.
Index ¶
- type MockNetwork
- func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder
- func (m *MockNetwork) Listen(ctx context.Context, bindAddress string, options ...network.ListenOption) (net.Listener, error)
- func (m *MockNetwork) LocalPeer() localpeer.LocalPeer
- func (m *MockNetwork) RegisterResolver(resolver network.Resolver)
- func (m *MockNetwork) Send(ctx context.Context, object *object.Object, publicKey crypto.PublicKey, ...) error
- func (m *MockNetwork) Subscribe(filters ...network.EnvelopeFilter) network.EnvelopeSubscription
- type MockNetworkMockRecorder
- func (mr *MockNetworkMockRecorder) Listen(ctx, bindAddress interface{}, options ...interface{}) *gomock.Call
- func (mr *MockNetworkMockRecorder) LocalPeer() *gomock.Call
- func (mr *MockNetworkMockRecorder) RegisterResolver(resolver interface{}) *gomock.Call
- func (mr *MockNetworkMockRecorder) Send(ctx, object, publicKey interface{}, sendOptions ...interface{}) *gomock.Call
- func (mr *MockNetworkMockRecorder) Subscribe(filters ...interface{}) *gomock.Call
- type MockNetworkSimple
- func (m *MockNetworkSimple) Addresses() []string
- func (m *MockNetworkSimple) Listen(ctx context.Context, bindAddress string, options ...network.ListenOption) (net.Listener, error)
- func (m *MockNetworkSimple) LocalPeer() localpeer.LocalPeer
- func (m *MockNetworkSimple) RegisterResolver(resolver network.Resolver)
- func (m *MockNetworkSimple) Send(ctx context.Context, obj *object.Object, rec crypto.PublicKey, ...) error
- func (m *MockNetworkSimple) SendCalled() int
- func (m *MockNetworkSimple) Subscribe(filters ...network.EnvelopeFilter) network.EnvelopeSubscription
- func (m *MockNetworkSimple) SubscribeCalled() int
- type MockResolver
- type MockResolverMockRecorder
- type MockSubscriptionSimple
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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) EXPECT ¶
func (m *MockNetwork) EXPECT() *MockNetworkMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockNetwork) Listen ¶
func (m *MockNetwork) Listen(ctx context.Context, bindAddress string, options ...network.ListenOption) (net.Listener, error)
Listen mocks base method
func (*MockNetwork) LocalPeer ¶
func (m *MockNetwork) LocalPeer() localpeer.LocalPeer
LocalPeer mocks base method
func (*MockNetwork) RegisterResolver ¶ added in v0.15.5
func (m *MockNetwork) RegisterResolver(resolver network.Resolver)
RegisterResolver mocks base method
func (*MockNetwork) Send ¶
func (m *MockNetwork) Send(ctx context.Context, object *object.Object, publicKey crypto.PublicKey, sendOptions ...network.SendOption) error
Send mocks base method
func (*MockNetwork) Subscribe ¶
func (m *MockNetwork) Subscribe(filters ...network.EnvelopeFilter) network.EnvelopeSubscription
Subscribe mocks base method
type MockNetworkMockRecorder ¶
type MockNetworkMockRecorder struct {
// contains filtered or unexported fields
}
MockNetworkMockRecorder is the mock recorder for MockNetwork
func (*MockNetworkMockRecorder) Listen ¶
func (mr *MockNetworkMockRecorder) Listen(ctx, bindAddress interface{}, options ...interface{}) *gomock.Call
Listen indicates an expected call of Listen
func (*MockNetworkMockRecorder) LocalPeer ¶
func (mr *MockNetworkMockRecorder) LocalPeer() *gomock.Call
LocalPeer indicates an expected call of LocalPeer
func (*MockNetworkMockRecorder) RegisterResolver ¶ added in v0.15.5
func (mr *MockNetworkMockRecorder) RegisterResolver(resolver interface{}) *gomock.Call
RegisterResolver indicates an expected call of RegisterResolver
func (*MockNetworkMockRecorder) Send ¶
func (mr *MockNetworkMockRecorder) Send(ctx, object, publicKey interface{}, sendOptions ...interface{}) *gomock.Call
Send indicates an expected call of Send
func (*MockNetworkMockRecorder) Subscribe ¶
func (mr *MockNetworkMockRecorder) Subscribe(filters ...interface{}) *gomock.Call
Subscribe indicates an expected call of Subscribe
type MockNetworkSimple ¶
type MockNetworkSimple struct { SubscribeCalls []network.EnvelopeSubscription SendCalls []error ReturnAddresses []string ReturnLocalPeer localpeer.LocalPeer // contains filtered or unexported fields }
func (*MockNetworkSimple) Addresses ¶
func (m *MockNetworkSimple) Addresses() []string
func (*MockNetworkSimple) Listen ¶
func (m *MockNetworkSimple) Listen( ctx context.Context, bindAddress string, options ...network.ListenOption, ) (net.Listener, error)
func (*MockNetworkSimple) LocalPeer ¶
func (m *MockNetworkSimple) LocalPeer() localpeer.LocalPeer
func (*MockNetworkSimple) RegisterResolver ¶ added in v0.15.5
func (m *MockNetworkSimple) RegisterResolver( resolver network.Resolver, )
func (*MockNetworkSimple) Send ¶
func (m *MockNetworkSimple) Send( ctx context.Context, obj *object.Object, rec crypto.PublicKey, opt ...network.SendOption, ) error
func (*MockNetworkSimple) SendCalled ¶
func (m *MockNetworkSimple) SendCalled() int
func (*MockNetworkSimple) Subscribe ¶
func (m *MockNetworkSimple) Subscribe( filters ...network.EnvelopeFilter, ) network.EnvelopeSubscription
func (*MockNetworkSimple) SubscribeCalled ¶
func (m *MockNetworkSimple) SubscribeCalled() int
type MockResolver ¶ added in v0.15.5
type MockResolver struct {
// contains filtered or unexported fields
}
MockResolver is a mock of Resolver interface
func NewMockResolver ¶ added in v0.15.5
func NewMockResolver(ctrl *gomock.Controller) *MockResolver
NewMockResolver creates a new mock instance
func (*MockResolver) EXPECT ¶ added in v0.15.5
func (m *MockResolver) EXPECT() *MockResolverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockResolver) LookupPeer ¶ added in v0.15.5
func (m *MockResolver) LookupPeer(ctx context.Context, publicKey crypto.PublicKey) (*peer.ConnectionInfo, error)
LookupPeer mocks base method
type MockResolverMockRecorder ¶ added in v0.15.5
type MockResolverMockRecorder struct {
// contains filtered or unexported fields
}
MockResolverMockRecorder is the mock recorder for MockResolver
func (*MockResolverMockRecorder) LookupPeer ¶ added in v0.15.5
func (mr *MockResolverMockRecorder) LookupPeer(ctx, publicKey interface{}) *gomock.Call
LookupPeer indicates an expected call of LookupPeer
type MockSubscriptionSimple ¶
type MockSubscriptionSimple struct { Objects []*network.Envelope // contains filtered or unexported fields }
func (*MockSubscriptionSimple) Cancel ¶
func (s *MockSubscriptionSimple) Cancel()
Cancel the subscription
func (*MockSubscriptionSimple) Channel ¶ added in v0.15.0
func (s *MockSubscriptionSimple) Channel() <-chan *network.Envelope
Next returns the next object