Documentation
¶
Index ¶
- Constants
- Variables
- type Emitter
- func (emitter Emitter) Events() map[string]events.Dispatcher
- func (emitter Emitter) Fire(e interface{}, mode int, context ...param.Store) error
- func (emitter Emitter) HasEvent(event string) bool
- func (emitter Emitter) Off(event string) events.Emitter
- func (emitter Emitter) On(event string, handlers ...events.Listener) events.Emitter
Constants ¶
View Source
const ( Async = iota Sync Cond )
Variables ¶
View Source
var ( DefaultDispatcherFactory = dispatcher.BroadcastFactory DefaultAsyncEmitter = New(dispatcher.ParallelBroadcastFactory) DefaultSyncEmitter = New(dispatcher.BroadcastFactory) DefaultCondEmitter = New(dispatcher.ConditionalParallelBroadcastFactory) )
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter struct { sync.Mutex DispatcherFactory events.DispatcherFactory Dispatchers map[string]events.Dispatcher }
func New ¶
func New(factory ...events.DispatcherFactory) *Emitter
func NewWithType ¶
Click to show internal directories.
Click to hide internal directories.