Documentation ¶
Index ¶
- func NewRegistry() *registry
- type EventDispatcher
- type EventRegistry
- type Handler
- type HandlerID
- type MockEventDispatcher
- type MockEventRegistry
- func (_m *MockEventRegistry) AddHandler(h Handler, names ...string)
- func (_m *MockEventRegistry) ClearEvents(name string)
- func (_m *MockEventRegistry) DelHandler(h Handler, names ...string)
- func (_m *MockEventRegistry) Dispatch(name string, ev ...interface{})
- func (_m *MockEventRegistry) EXPECT() *_MockEventRegistryRecorder
- type MockHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRegistry ¶
func NewRegistry() *registry
Types ¶
type EventDispatcher ¶
type EventDispatcher interface {
Dispatch(name string, ev ...interface{})
}
type EventRegistry ¶
type Handler ¶
type Handler interface { Run(...interface{}) Id() HandlerID }
func NewHandler ¶
func NewHandler(h func(...interface{})) Handler
type MockEventDispatcher ¶
type MockEventDispatcher struct {
// contains filtered or unexported fields
}
Mock of EventDispatcher interface
func NewMockEventDispatcher ¶
func NewMockEventDispatcher(ctrl *gomock.Controller) *MockEventDispatcher
func (*MockEventDispatcher) Dispatch ¶
func (_m *MockEventDispatcher) Dispatch(name string, ev ...interface{})
func (*MockEventDispatcher) EXPECT ¶
func (_m *MockEventDispatcher) EXPECT() *_MockEventDispatcherRecorder
type MockEventRegistry ¶
type MockEventRegistry struct {
// contains filtered or unexported fields
}
Mock of EventRegistry interface
func NewMockEventRegistry ¶
func NewMockEventRegistry(ctrl *gomock.Controller) *MockEventRegistry
func (*MockEventRegistry) AddHandler ¶
func (_m *MockEventRegistry) AddHandler(h Handler, names ...string)
func (*MockEventRegistry) ClearEvents ¶
func (_m *MockEventRegistry) ClearEvents(name string)
func (*MockEventRegistry) DelHandler ¶
func (_m *MockEventRegistry) DelHandler(h Handler, names ...string)
func (*MockEventRegistry) Dispatch ¶
func (_m *MockEventRegistry) Dispatch(name string, ev ...interface{})
func (*MockEventRegistry) EXPECT ¶
func (_m *MockEventRegistry) EXPECT() *_MockEventRegistryRecorder
type MockHandler ¶
type MockHandler struct {
// contains filtered or unexported fields
}
Mock of Handler interface
func NewMockHandler ¶
func NewMockHandler(ctrl *gomock.Controller) *MockHandler
func (*MockHandler) EXPECT ¶
func (_m *MockHandler) EXPECT() *_MockHandlerRecorder
func (*MockHandler) Id ¶
func (_m *MockHandler) Id() HandlerID
func (*MockHandler) Run ¶
func (_m *MockHandler) Run(_param0 ...interface{})
Click to show internal directories.
Click to hide internal directories.