Documentation ¶
Index ¶
- type Debouncer
- type Emitter
- func (instance *Emitter) Clear()
- func (instance *Emitter) Debounce(waitTime time.Duration) *Emitter
- func (instance *Emitter) Emit(eventName string, args ...interface{}) *Emitter
- func (instance *Emitter) EmitAsync(eventName string, args ...interface{}) *Emitter
- func (instance *Emitter) Has(eventName string) bool
- func (instance *Emitter) Off(eventName string, callback ...func(event *Event)) *Emitter
- func (instance *Emitter) On(eventName string, callback func(event *Event)) *Emitter
- func (instance *Emitter) Trigger(async bool, eventName string, args ...interface{}) *Emitter
- type EmitterListeners
- func (instance *EmitterListeners) Clear()
- func (instance *EmitterListeners) GetListeners() (response map[string][]EventCallback)
- func (instance *EmitterListeners) Has(eventName string) bool
- func (instance *EmitterListeners) Off(eventName string, callback ...func(event *Event))
- func (instance *EmitterListeners) On(eventName string, callback EventCallback) (response map[string][]EventCallback)
- type Event
- func (instance *Event) Argument(index int) interface{}
- func (instance *Event) ArgumentAsBytes(index int) []byte
- func (instance *Event) ArgumentAsError(index int) error
- func (instance *Event) ArgumentAsInt(index int) int
- func (instance *Event) ArgumentAsString(index int) string
- func (instance *Event) ArgumentsInterface() interface{}
- type EventCallback
- type EventsHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Emitter ¶
type Emitter struct {
// contains filtered or unexported fields
}
func NewEmitterInstance ¶
type EmitterListeners ¶
type EmitterListeners struct {
// contains filtered or unexported fields
}
func NewListeners ¶
func NewListeners() (instance *EmitterListeners)
func (*EmitterListeners) Clear ¶
func (instance *EmitterListeners) Clear()
func (*EmitterListeners) GetListeners ¶
func (instance *EmitterListeners) GetListeners() (response map[string][]EventCallback)
func (*EmitterListeners) Has ¶
func (instance *EmitterListeners) Has(eventName string) bool
func (*EmitterListeners) Off ¶
func (instance *EmitterListeners) Off(eventName string, callback ...func(event *Event))
func (*EmitterListeners) On ¶
func (instance *EmitterListeners) On(eventName string, callback EventCallback) (response map[string][]EventCallback)
type Event ¶
func (*Event) ArgumentAsBytes ¶
func (*Event) ArgumentAsError ¶
func (*Event) ArgumentAsInt ¶
func (*Event) ArgumentAsString ¶
func (*Event) ArgumentsInterface ¶
func (instance *Event) ArgumentsInterface() interface{}
type EventCallback ¶
type EventCallback func(event *Event)
type EventsHelper ¶
type EventsHelper struct { }
var Events *EventsHelper
func (*EventsHelper) NewDebounceEmitter ¶
func (instance *EventsHelper) NewDebounceEmitter(waitTime time.Duration, payload ...interface{}) *Emitter
func (*EventsHelper) NewEmitter ¶
func (instance *EventsHelper) NewEmitter(payload ...interface{}) *Emitter
Click to show internal directories.
Click to hide internal directories.