Documentation
¶
Index ¶
Constants ¶
View Source
const OrderDefault = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event[T EventData] struct { // contains filtered or unexported fields }
func (*Event[T]) Subscribe ¶
func (e *Event[T]) Subscribe(call func(*T)) *EventSubscription[*T]
type EventSubscription ¶
type EventSubscription[T EventData] struct { // contains filtered or unexported fields }
func NewSubscription ¶
func NewSubscription[T EventData](call func(T), unsubscribe func()) *EventSubscription[T]
func (*EventSubscription[T]) Order ¶
func (s *EventSubscription[T]) Order(order int) *EventSubscription[T]
Order sets the execution order of the subcription. Higher numbers mean later execution.
func (*EventSubscription[T]) Unsubscribe ¶
func (s *EventSubscription[T]) Unsubscribe()
Click to show internal directories.
Click to hide internal directories.