rx

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 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] interface {
	Observe() <-chan T
	Subscribers() []chan T
	Unsub(<-chan T)
}

type IterableImpl

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

func (*IterableImpl[T]) Observe

func (i *IterableImpl[T]) Observe() <-chan T

func (*IterableImpl[T]) Subscribers

func (i *IterableImpl[T]) Subscribers() []chan T

func (*IterableImpl[T]) Unsub

func (i *IterableImpl[T]) Unsub(ch <-chan T)

type Observable

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

func FromChannel

func FromChannel[T any](ch <-chan T) Observable[T]

func (*Observable[T]) Subscribe

func (o *Observable[T]) Subscribe(cb func(item T)) Subscription

func (*Observable[T]) UnsubscribeAll

func (o *Observable[T]) UnsubscribeAll()

type Subscription

type Subscription struct {
	Unsubscribe func()
}

Jump to

Keyboard shortcuts

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