reactive

package
v1.40.9 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AwaitChannel

func AwaitChannel[T any](channel <-chan T) tea.Cmd

func ListManyFor

func ListManyFor[T any](sub *Subscription, in ...SubscriberMethod[T]) tea.Cmd

func ListenFor

func ListenFor[T any](sub *Subscription, in SubscriberMethod[T])

func ReceiveOn

func ReceiveOn[T any](sub *Subscription, channel chan T)

Types

type ChanMsg

type ChanMsg[T any] struct {
	Source <-chan T
	Ok     bool
	Value  T
}

type Message

type Message struct {
	Msg tea.Msg
}

type SubscriberMethod

type SubscriberMethod[T any] func(fn func(T))

type Subscription

type Subscription struct {
	// contains filtered or unexported fields
}

func NewSubscriber

func NewSubscriber() *Subscription

func (*Subscription) AwaitNextMsg

func (r *Subscription) AwaitNextMsg() tea.Cmd

Jump to

Keyboard shortcuts

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