store

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KVWatchOp

type KVWatchOp int64

KVWatchOp is the operation as detected by the KV watcher.

const (
	// KVPut indicates an element has been put/added into the KV store.
	KVPut KVWatchOp = iota
	// KVDelete represents a delete.
	KVDelete
	// KVPurge is when the kv bucket is purged.
	KVPurge
)

func (KVWatchOp) String

func (kvOp KVWatchOp) String() string

type WMStorer

type WMStorer interface {
	WatermarkKVStorer
	WatermarkKVWatcher
}

WMStorer is the watermark store implementation.

type WatermarkKVEntry

type WatermarkKVEntry interface {
	// Key is the key that was retrieved.
	Key() string
	// Value is the retrieved value.
	Value() []byte
	// Operation returns `KVWatchOp`.
	Operation() KVWatchOp
}

WatermarkKVEntry defines what can be read on the Watch stream.

type WatermarkKVStorer

type WatermarkKVStorer interface {
	// GetAllKeys the keys from KV store.
	GetAllKeys(context.Context) ([]string, error)
	// DeleteKey deletes the key from KV store.
	DeleteKey(context.Context, string) error
	// PutKV inserts a key-value pair into the KV store.
	PutKV(context.Context, string, []byte) error
	// GetValue gets the value of the given key.
	GetValue(context.Context, string) ([]byte, error)
	// GetStoreName returns the bucket name of the KV store.
	GetStoreName() string
	// Close closes the backend connection
	Close()
}

WatermarkKVStorer is defines the storage for publishing the watermark.

type WatermarkKVWatcher

type WatermarkKVWatcher interface {
	Watch(context.Context) <-chan WatermarkKVEntry
	GetKVName() string
	Close()
}

WatermarkKVWatcher watches the KV bucket for watermark progression.

Directories

Path Synopsis
Package jetstream package implements the watermark progression using Jetstream as the KV store.
Package jetstream package implements the watermark progression using Jetstream as the KV store.

Jump to

Keyboard shortcuts

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