Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DispatcherCapacity = 20 DefaultDispatchTimeout = 10 * time.Second HandlerCapacity = 10 )
Functions ¶
func MakeHandler ¶
func MakeHandler[E any]() chan E
Types ¶
type Dispatcher ¶
func NewDispatcher ¶
func NewDispatcher() *Dispatcher
func (*Dispatcher) Dispatch ¶
func (d *Dispatcher) Dispatch(event any)
func (*Dispatcher) GoString ¶
func (d *Dispatcher) GoString() string
func (*Dispatcher) String ¶
func (d *Dispatcher) String() string
func (*Dispatcher) Subscribe ¶
func (d *Dispatcher) Subscribe(handler interface{}) *Subscription
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
func (*Subscription) Apply ¶
func (s *Subscription) Apply()
func (*Subscription) Cancel ¶
func (s *Subscription) Cancel()
Click to show internal directories.
Click to hide internal directories.