utils

package
v0.58.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

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

func NewObserver

func NewObserver[T any](name string, log *logging.Logger, inChSize, outChSize int) Observer[T]

func (*Observer[T]) GetSubscribersCount

func (o *Observer[T]) GetSubscribersCount() int32

func (*Observer[T]) Notify

func (o *Observer[T]) Notify(values []T)

func (*Observer[T]) Observe

func (o *Observer[T]) Observe(ctx context.Context, retries int, filter func(T) bool) (<-chan []T, uint64)

func (*Observer[T]) Subscribe

func (o *Observer[T]) Subscribe(ctx context.Context, filter func(T) bool) (chan []T, uint64)

func (*Observer[T]) Unsubscribe

func (o *Observer[T]) Unsubscribe(ctx context.Context, ref uint64) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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