Help us shape the future of Go! Take the 2026 Go Developer Survey

event

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2014 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

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 EventRegistry interface {
	AddHandler(h Handler, names ...string)
	DelHandler(h Handler, names ...string)
	Dispatch(name string, ev ...interface{})
	ClearEvents(name string)
}

type Handler

type Handler interface {
	Run(...interface{})
	Id() HandlerID
}

func NewHandler

func NewHandler(h func(...interface{})) Handler

type HandlerID

type HandlerID uint32

func NewHandlerID

func NewHandlerID() HandlerID

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{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL