Help us shape the future of Go! Take the 2026 Go Developer Survey

goreact

package module
v0.0.0-...-aa0a335 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

README

goreact

light and very simple reactive framework for go In fact this is just an Observer pattern for now Todo

  • Operator
  • Hot/Cold Signals
  • So much more

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filterable

type Filterable[T any] interface {
	Filter(filter func(elem T) bool)
}

type Mappable

type Mappable[I any, O any] interface {
	Map(mapper func(elem I) O) Observable[O]
}

type Mergeable

type Mergeable[T any] interface {
	Merge(observer ...Observable[T])
}

type Observable

type Observable[T any] interface {
	Subscribe(ctx context.Context, next func(T), err func(err error)) context.CancelFunc
}

func Observe

func Observe[T any](signal func(channel chan<- T, err chan<- error)) Observable[T]

type ObserveStream

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

func (ObserveStream[T]) Subscribe

func (obs ObserveStream[T]) Subscribe(ctx context.Context, next func(T), err func(err error)) context.CancelFunc

func (ObserveStream[T]) ToMap

func (obs ObserveStream[T]) ToMap() Mappable

Jump to

Keyboard shortcuts

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