observable

package
v1.31.1 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Iterable

type Iterable[T any] <-chan T

type Observable

type Observable[T any] struct {
	// contains filtered or unexported fields
}

func NewObservable

func NewObservable[T any](iter Iterable[T]) *Observable[T]

func (*Observable[T]) HasSubscriber

func (o *Observable[T]) HasSubscriber() bool

func (*Observable[T]) Subscribe

func (o *Observable[T]) Subscribe() (Subscription[T], error)

func (*Observable[T]) UnSubscribe

func (o *Observable[T]) UnSubscribe(sub Subscription[T])

type Subscriber

type Subscriber[T any] struct {
	// contains filtered or unexported fields
}

func (*Subscriber[T]) Close

func (s *Subscriber[T]) Close()

func (*Subscriber[T]) Emit

func (s *Subscriber[T]) Emit(item T)

func (*Subscriber[T]) Out

func (s *Subscriber[T]) Out() Subscription[T]

type Subscription

type Subscription[T any] <-chan T

Jump to

Keyboard shortcuts

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