mrsender

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 3 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEventPool

func NewEventPool(bufferSize uint32) *eventPool

Types

type EventArgs

type EventArgs any

type EventEmitter

type EventEmitter interface {
	Emit(ctx context.Context, eventName string, object any)
	EmitWithSource(ctx context.Context, eventName, source string, object any)
}

func NewNopEventEmitter

func NewNopEventEmitter() EventEmitter

type EventHandlerFunc

type EventHandlerFunc func(ctx context.Context, args EventArgs)

type EventPool

type EventPool interface {
	Listen(eventName string, handlerFunc EventHandlerFunc)
	Emit(eventName string, args EventArgs) error
	EmitWithContext(ctx context.Context, eventName string, args EventArgs) error
	List() []string
	Has(eventName string) bool
	Remove(eventNames ...string)
	Wait()
}

Jump to

Keyboard shortcuts

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