Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithControlQueue ¶ added in v0.0.2
Types ¶
type Reactor ¶
type Reactor[T any] interface { // Start starts the event loop Start(context.Context) error // Enqueue adds a new event to the event queue Enqueue(T) // Register registers handlers. It accepts the event selector, amount of goroutine workers // that will be used to process events, and the handlers that will be called. Register(id string, s Selector[T], workers int, handlers ...Handler[T]) // Unregister unregisters handlers Unregister(id string) }
Reactor provides a thread-safe, non-blocking, asynchronous event processing. It uses lock-free queues for events and control messages.
Click to show internal directories.
Click to hide internal directories.