Documentation ¶
Overview ¶
Package subscribs is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrHandlerNotFound raises when handler func not found ErrHandlerNotFound = errors.New("event handler not found") )
Functions ¶
This section is empty.
Types ¶
type EventHandler ¶
type EventHandler interface { // Emit event data. Emit(args ...interface{}) error // Subscribe on event data. On(*HandlerOnFunc) (HandlerOffFunc, error) // Unsubscribe from event data. Off(*HandlerOnFunc) error // Unsubscribe all subscribers. OffAll() error }
EventHandler .
func NewSyncEventHandler ¶
func NewSyncEventHandler() EventHandler
NewSyncEventHandler creates sync event handler
type MockEventHandler ¶
type MockEventHandler struct {
// contains filtered or unexported fields
}
MockEventHandler is a mock of EventHandler interface
func NewMockEventHandler ¶
func NewMockEventHandler(ctrl *gomock.Controller) *MockEventHandler
NewMockEventHandler creates a new mock instance
func (*MockEventHandler) EXPECT ¶
func (m *MockEventHandler) EXPECT() *MockEventHandlerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockEventHandler) Emit ¶
func (m *MockEventHandler) Emit(args ...interface{}) error
Emit mocks base method
func (*MockEventHandler) Off ¶
func (m *MockEventHandler) Off(arg0 *HandlerOnFunc) error
Off mocks base method
func (*MockEventHandler) OffAll ¶
func (m *MockEventHandler) OffAll() error
OffAll mocks base method
func (*MockEventHandler) On ¶
func (m *MockEventHandler) On(arg0 *HandlerOnFunc) (HandlerOffFunc, error)
On mocks base method
type MockEventHandlerMockRecorder ¶
type MockEventHandlerMockRecorder struct {
// contains filtered or unexported fields
}
MockEventHandlerMockRecorder is the mock recorder for MockEventHandler
func (*MockEventHandlerMockRecorder) Emit ¶
func (mr *MockEventHandlerMockRecorder) Emit(args ...interface{}) *gomock.Call
Emit indicates an expected call of Emit
func (*MockEventHandlerMockRecorder) Off ¶
func (mr *MockEventHandlerMockRecorder) Off(arg0 interface{}) *gomock.Call
Off indicates an expected call of Off
func (*MockEventHandlerMockRecorder) OffAll ¶
func (mr *MockEventHandlerMockRecorder) OffAll() *gomock.Call
OffAll indicates an expected call of OffAll
func (*MockEventHandlerMockRecorder) On ¶
func (mr *MockEventHandlerMockRecorder) On(arg0 interface{}) *gomock.Call
On indicates an expected call of On
Click to show internal directories.
Click to hide internal directories.