utils

package
v0.67.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressFile added in v0.63.0

func CompressFile(source string, target string) error

func DecompressFile added in v0.63.0

func DecompressFile(source string, target string) error

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