Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Observable ¶
type Observable[T any] interface { Subscribe() (subscription Subscription[T], done <-chan struct{}, err error) UnSubscribe(subscription Subscription[T]) }
type Observer ¶
type Observer[T any] struct { // contains filtered or unexported fields }
func NewObserver ¶
func NewObserver[T any](subscriber *Subscriber[T], listenerBufferSize int) *Observer[T]
func (*Observer[T]) Subscribe ¶
func (o *Observer[T]) Subscribe() (subscription Subscription[T], done <-chan struct{}, err error)
func (*Observer[T]) UnSubscribe ¶
func (o *Observer[T]) UnSubscribe(subscription Subscription[T])
type Subscriber ¶
type Subscriber[T any] struct { // contains filtered or unexported fields }
func NewSubscriber ¶
func NewSubscriber[T any](size int) *Subscriber[T]
func (*Subscriber[T]) Close ¶
func (s *Subscriber[T]) Close() error
func (*Subscriber[T]) Emit ¶
func (s *Subscriber[T]) Emit(item T)
func (*Subscriber[T]) Subscription ¶
func (s *Subscriber[T]) Subscription() (subscription Subscription[T], done <-chan struct{})
type Subscription ¶
type Subscription[T any] <-chan T
Click to show internal directories.
Click to hide internal directories.