Versions in this module Expand all Collapse all v1 v1.27.2 Oct 23, 2024 Changes in this version + const DefaultQueueSize + type Emitter struct + func NewEmitter[K comparable, V any](opts ...Option) *Emitter[K, V] + func (e *Emitter[K, V]) Emit(k K, v V) + func (e *Emitter[K, V]) Notify(k K, ch chan V) func() + func (e *Emitter[K, V]) Observe(k K) Observer[V] + func (e *Emitter[K, V]) ObservedKeys() []K + func (e *Emitter[K, V]) On(k K, f func(V)) func() + type Observer interface + Events func() <-chan V + Stop func() + func NewObserver[V any](stopFunc func()) (Observer[V], func(v V)) + type ObserverList struct + func NewObserverList[V any](opts ...Option) *ObserverList[V] + func (l *ObserverList[V]) Emit(v V) + func (l *ObserverList[V]) Len() int + func (l *ObserverList[V]) Notify(ch chan V) func() + func (l *ObserverList[V]) Observe() Observer[V] + func (l *ObserverList[V]) On(f func(V)) func() + type Option func(o *Options) + func WithBlocking() Option + func WithLogger(l logger.Logger) Option + func WithOptions(src Options) Option + func WithQueueSize(size int) Option + type Options struct + Blocking bool + Logger logger.Logger + QueueSize int + func DefaultOptions() Options