subscriptions

package
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 3 Imported by: 0

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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL