observer

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewObserverImpl

func NewObserverImpl[T interface{}](repeatInterval time.Duration) types.Observer[T]

Types

type ObserverImpl

type ObserverImpl[T interface{}] struct {
	// contains filtered or unexported fields
}

func (*ObserverImpl[T]) Publish

func (h *ObserverImpl[T]) Publish(element T) bool

func (*ObserverImpl[T]) PublishWithWaiting

func (h *ObserverImpl[T]) PublishWithWaiting(ctx context.Context, element T)

func (*ObserverImpl[T]) Release

func (h *ObserverImpl[T]) Release()

func (*ObserverImpl[T]) Subscribe

func (h *ObserverImpl[T]) Subscribe(s func(T) bool) uint64

func (*ObserverImpl[T]) Unsubscribe

func (h *ObserverImpl[T]) Unsubscribe(id uint64)

Jump to

Keyboard shortcuts

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