Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUninitialized = errors.New("store_empty")
)
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct { Name string Fn EventHandler }
type EventEmitter ¶
type EventEmitter interface { On(eventName string, handler EventHandler) Off(eventName string) Emit(eventName string, args ...interface{}) Result }
type EventHandler ¶
type EventHandler func(args ...interface{}) Result
type EventStore ¶
type EventStore struct {
// contains filtered or unexported fields
}
func NewEventStore ¶
func NewEventStore() *EventStore
func (*EventStore) Emit ¶
func (e *EventStore) Emit(event string, data ...interface{}) Result
func (*EventStore) Off ¶
func (e *EventStore) Off(event string)
func (*EventStore) On ¶
func (e *EventStore) On(name string, fn EventHandler)
Click to show internal directories.
Click to hide internal directories.