jetbucket

package
v0.7.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInitialValuesOver = errors.New("initial values done")

Functions

This section is empty.

Types

type Bucket

type Bucket[T any] interface {
	Get(ctx context.Context, key string) (jetstream.KeyValueEntry, *T, error)
	Put(ctx context.Context, key string, mod *T) (rev uint64, err error)
	Delete(ctx context.Context, key string, opts ...jetstream.KVDeleteOpt) error
	Watch(ctx context.Context, match string, opts ...jetstream.WatchOpt) (Watcher[T], error)
	WatchAll(ctx context.Context, opts ...jetstream.WatchOpt) (Watcher[T], error)
}

func NewBucket

func NewBucket[T any](bucket bucket) Bucket[T]

type Watcher

type Watcher[T any] interface {
	Next() (jetstream.KeyValueEntry, *T, error)
	Stop() error
}

func NewWatcher

func NewWatcher[T any](w watcher) Watcher[T]

Jump to

Keyboard shortcuts

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