Documentation
¶
Overview ¶
Package jetstream package implements the watermark progression using Jetstream as the KV store.
Index ¶
- type JSKVStoreOption
- type JSKVWatcherOption
- type KVJetStreamStore
- func (kv *KVJetStreamStore) Close()
- func (kv *KVJetStreamStore) DeleteKey(_ context.Context, k string) error
- func (kv *KVJetStreamStore) GetAllKeys(_ context.Context) ([]string, error)
- func (kv *KVJetStreamStore) GetStoreName() string
- func (kv *KVJetStreamStore) GetValue(_ context.Context, k string) ([]byte, error)
- func (kv *KVJetStreamStore) PutKV(_ context.Context, k string, v []byte) error
- type KVJetStreamWatch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSKVStoreOption ¶
type JSKVStoreOption func(*KVJetStreamStore) error
JSKVStoreOption is to pass in Jetstream options.
type JSKVWatcherOption ¶
type JSKVWatcherOption func(*KVJetStreamWatch) error
JSKVWatcherOption is to pass in Jetstream options.
type KVJetStreamStore ¶
type KVJetStreamStore struct {
// contains filtered or unexported fields
}
KVJetStreamStore implements the watermark's KV store backed up by Jetstream.
func NewKVJetStreamKVStore ¶
func NewKVJetStreamKVStore(ctx context.Context, pipelineName string, bucketName string, client clients.JetStreamClient, opts ...JSKVStoreOption) (*KVJetStreamStore, error)
NewKVJetStreamKVStore returns KVJetStreamStore.
func (*KVJetStreamStore) Close ¶
func (kv *KVJetStreamStore) Close()
Close closes the jetstream connection.
func (*KVJetStreamStore) DeleteKey ¶
func (kv *KVJetStreamStore) DeleteKey(_ context.Context, k string) error
DeleteKey deletes the key from the JS key-value store.
func (*KVJetStreamStore) GetAllKeys ¶
func (kv *KVJetStreamStore) GetAllKeys(_ context.Context) ([]string, error)
GetAllKeys returns all the keys in the key-value store.
func (*KVJetStreamStore) GetStoreName ¶
func (kv *KVJetStreamStore) GetStoreName() string
GetStoreName returns the store name.
type KVJetStreamWatch ¶
type KVJetStreamWatch struct {
// contains filtered or unexported fields
}
KVJetStreamWatch implements the watermark's KV store backed up by Jetstream.
func NewKVJetStreamKVWatch ¶
func NewKVJetStreamKVWatch(ctx context.Context, pipelineName string, kvBucketName string, client clients.JetStreamClient, opts ...JSKVWatcherOption) (*KVJetStreamWatch, error)
NewKVJetStreamKVWatch returns KVJetStreamWatch specific to Jetsteam which implements the WatermarkKVWatcher interface.
func (*KVJetStreamWatch) GetKVName ¶
func (k *KVJetStreamWatch) GetKVName() string
GetKVName returns the KV store (bucket) name.
func (*KVJetStreamWatch) Watch ¶
func (k *KVJetStreamWatch) Watch(ctx context.Context) <-chan store.WatermarkKVEntry
Watch watches the key-value store (aka bucket).