notify

package
v0.0.0-...-8871cbf Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type C

type C[T any] struct {
	*V[T]
	// contains filtered or unexported fields
}

func (*C[T]) Update

func (c *C[T]) Update(f func(t T))

type V

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

func New

func New[T any](t T) *V[T]

func NewEmpty

func NewEmpty[T any]() *V[T]

func (*V[T]) Copying

func (v *V[T]) Copying(f func(T) T) *C[T]

func (*V[T]) Get

func (v *V[T]) Get(ctx context.Context, version uint64) (T, uint64, error)

func (*V[T]) GetAny

func (v *V[T]) GetAny(ctx context.Context) (T, uint64, error)

func (*V[T]) Listen

func (v *V[T]) Listen(ctx context.Context, f func(t T) error) error

func (*V[T]) Notify

func (v *V[T]) Notify(ctx context.Context) <-chan T

func (*V[T]) Peek

func (v *V[T]) Peek() (T, error)

func (*V[T]) Set

func (v *V[T]) Set(t T)

func (*V[T]) Sync

func (v *V[T]) Sync(f func())

func (*V[T]) Update

func (v *V[T]) Update(f func(t T) T)

func (*V[T]) UpdateOpt

func (v *V[T]) UpdateOpt(f func(t T) (T, bool)) bool

Jump to

Keyboard shortcuts

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