Documentation
¶
Index ¶
- Variables
- func ListenToFreePort(socket mangos.Socket, host string) (int, error)
- func WithReadTimeout(t time.Duration) func(OptionSetter) error
- func WithSendTimeout(t time.Duration) func(OptionSetter) error
- type Base
- type MockBase
- type MockOptionSetter
- type MockReplier
- type MockReplierSocket
- type MockRequester
- type MockSubscriber
- type OptionSetter
- type Options
- type Replier
- type ReplierSocket
- type Requester
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func ListenToFreePort ¶
func WithReadTimeout ¶
func WithReadTimeout(t time.Duration) func(OptionSetter) error
func WithSendTimeout ¶
func WithSendTimeout(t time.Duration) func(OptionSetter) error
Types ¶
type MockBase ¶
MockBase is an autogenerated mock type for the Base type
func NewMockBase ¶
NewMockBase creates a new instance of MockBase. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
type MockOptionSetter ¶
MockOptionSetter is an autogenerated mock type for the OptionSetter type
func NewMockOptionSetter ¶
func NewMockOptionSetter(t interface { mock.TestingT Cleanup(func()) }) *MockOptionSetter
NewMockOptionSetter creates a new instance of MockOptionSetter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockOptionSetter) SetOption ¶
func (_m *MockOptionSetter) SetOption(name string, value interface{}) error
SetOption provides a mock function with given fields: name, value
type MockReplier ¶
MockReplier is an autogenerated mock type for the Replier type
func NewMockReplier ¶
func NewMockReplier(t interface { mock.TestingT Cleanup(func()) }) *MockReplier
NewMockReplier creates a new instance of MockReplier. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockReplier) Close ¶
func (_m *MockReplier) Close() error
Close provides a mock function with given fields:
func (*MockReplier) GetHost ¶
func (_m *MockReplier) GetHost() string
GetHost provides a mock function with given fields:
func (*MockReplier) GetPort ¶
func (_m *MockReplier) GetPort() int
GetPort provides a mock function with given fields:
func (*MockReplier) Receive ¶
func (_m *MockReplier) Receive(msg proto.Message, opt ...func(OptionSetter) error) (ReplierSocket, error)
Receive provides a mock function with given fields: msg, opt
type MockReplierSocket ¶
MockReplierSocket is an autogenerated mock type for the ReplierSocket type
func NewMockReplierSocket ¶
func NewMockReplierSocket(t interface { mock.TestingT Cleanup(func()) }) *MockReplierSocket
NewMockReplierSocket creates a new instance of MockReplierSocket. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockReplierSocket) Reply ¶
func (_m *MockReplierSocket) Reply(msg proto.Message, opt ...func(OptionSetter) error) error
Reply provides a mock function with given fields: msg, opt
type MockRequester ¶
MockRequester is an autogenerated mock type for the Requester type
func NewMockRequester ¶
func NewMockRequester(t interface { mock.TestingT Cleanup(func()) }) *MockRequester
NewMockRequester creates a new instance of MockRequester. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockRequester) Close ¶
func (_m *MockRequester) Close() error
Close provides a mock function with given fields:
func (*MockRequester) GetHost ¶
func (_m *MockRequester) GetHost() string
GetHost provides a mock function with given fields:
func (*MockRequester) GetPort ¶
func (_m *MockRequester) GetPort() int
GetPort provides a mock function with given fields:
func (*MockRequester) Request ¶
func (_m *MockRequester) Request(msg proto.Message, reply proto.Message, opts ...func(OptionSetter) error) error
Request provides a mock function with given fields: msg, reply, opts
type MockSubscriber ¶
MockSubscriber is an autogenerated mock type for the Subscriber type
func NewMockSubscriber ¶
func NewMockSubscriber(t interface { mock.TestingT Cleanup(func()) }) *MockSubscriber
NewMockSubscriber creates a new instance of MockSubscriber. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSubscriber) Close ¶
func (_m *MockSubscriber) Close() error
Close provides a mock function with given fields:
func (*MockSubscriber) GetHost ¶
func (_m *MockSubscriber) GetHost() string
GetHost provides a mock function with given fields:
func (*MockSubscriber) GetPort ¶
func (_m *MockSubscriber) GetPort() int
GetPort provides a mock function with given fields:
func (*MockSubscriber) Receive ¶
func (_m *MockSubscriber) Receive(msg proto.Message, opt ...func(OptionSetter) error) error
Receive provides a mock function with given fields: msg, opt
type OptionSetter ¶
type Replier ¶
type Replier interface { Base Receive(msg proto.Message, opt ...func(OptionSetter) error) (ReplierSocket, error) }
func NewReplier ¶
type ReplierSocket ¶
type ReplierSocket interface {
Reply(msg proto.Message, opt ...func(OptionSetter) error) error
}
type Requester ¶
type Requester interface { Base Request(msg proto.Message, reply proto.Message, opts ...func(OptionSetter) error) error }
func NewRequester ¶
type Subscriber ¶
type Subscriber interface { Base Receive(msg proto.Message, opt ...func(OptionSetter) error) error }
func NewSubscriber ¶
func NewSubscriber(host string, port int, options ...func(OptionSetter) error) (Subscriber, error)