rxgo

package module
v0.0.0-...-5abd069 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 0 Imported by: 0

README

rxgo (Reactive Go)

Reactive programming in Go

DISCLAIMER: This is not an officially supported Google product.

No, really, this is not.

This is code that happens to be owned by Google for legal reasons.

Documentation

Overview

Package rxgo provides a basic implementations of reactive programming for Go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BehaviorSubject

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

func NewBehaviorSubject

func NewBehaviorSubject[T any](val T) *BehaviorSubject[T]

func (*BehaviorSubject[T]) Complete

func (s *BehaviorSubject[T]) Complete()

func (*BehaviorSubject[T]) Error

func (s *BehaviorSubject[T]) Error(err error)

func (*BehaviorSubject[T]) Next

func (s *BehaviorSubject[T]) Next(elm T)

func (*BehaviorSubject[T]) Subscribe

func (s *BehaviorSubject[T]) Subscribe(o Observer[T]) Subscription

type Observable

type Observable[T any] interface {
	Subscribe(Observer[T]) Subscription
}

type Observer

type Observer[T any] interface {
	Next(T)
	Complete()
	Error(error)
}

type ReplaySubject

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

func NewReplaySubject

func NewReplaySubject[T any](size int) *ReplaySubject[T]

func (*ReplaySubject[T]) Complete

func (s *ReplaySubject[T]) Complete()

func (*ReplaySubject[T]) Error

func (s *ReplaySubject[T]) Error(err error)

func (*ReplaySubject[T]) Next

func (s *ReplaySubject[T]) Next(elm T)

func (*ReplaySubject[T]) Subscribe

func (s *ReplaySubject[T]) Subscribe(o Observer[T]) Subscription

type Subject

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

func NewSubject

func NewSubject[T any]() *Subject[T]

func (*Subject[T]) Complete

func (s *Subject[T]) Complete()

func (*Subject[T]) Error

func (s *Subject[T]) Error(err error)

func (*Subject[T]) Next

func (s *Subject[T]) Next(elm T)

func (*Subject[T]) Subscribe

func (s *Subject[T]) Subscribe(o Observer[T]) Subscription

type Subscription

type Subscription interface {
	Unsubscribe()
}

Jump to

Keyboard shortcuts

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