Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Subscription ¶
type Subscription[K comparable, V any] struct { // contains filtered or unexported fields }
type Subscriptions ¶
type Subscriptions[K comparable, V any] struct { sync.RWMutex // contains filtered or unexported fields }
func New ¶
func New[K comparable, V any]() *Subscriptions[K, V]
func (*Subscriptions[K, V]) Add ¶
func (s *Subscriptions[K, V]) Add(suber *subscriber.Subscriber[K, V]) chan V
func (*Subscriptions[K, V]) Close ¶
func (s *Subscriptions[K, V]) Close()
func (*Subscriptions[K, V]) Notify ¶
func (s *Subscriptions[K, V]) Notify(k K, v V) error
func (*Subscriptions[K, V]) NotifyAll ¶
func (s *Subscriptions[K, V]) NotifyAll(v V)
func (*Subscriptions[K, V]) Remove ¶
func (s *Subscriptions[K, V]) Remove(key K)
Click to show internal directories.
Click to hide internal directories.