Documentation ¶
Index ¶
- func WithKey[T any](base storage.KeyValueStoreT[T], key string) storage.ValueStoreT[T]
- func WithPrefix[T any](base storage.KeyValueStoreT[T], prefix string) storage.KeyValueStoreT[T]
- type KeyValueStoreLocker
- type ValueStoreAdapter
- func (s ValueStoreAdapter[T]) Delete(ctx context.Context, opts ...storage.DeleteOpt) error
- func (s ValueStoreAdapter[T]) Get(ctx context.Context, opts ...storage.GetOpt) (T, error)
- func (s ValueStoreAdapter[T]) History(ctx context.Context, opts ...storage.HistoryOpt) ([]storage.KeyRevision[T], error)
- func (s ValueStoreAdapter[T]) Put(ctx context.Context, value T, opts ...storage.PutOpt) error
- func (s ValueStoreAdapter[T]) Watch(ctx context.Context, opts ...storage.WatchOpt) (<-chan storage.WatchEvent[storage.KeyRevision[T]], error)
- type ValueStoreLocker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithKey ¶
func WithKey[T any](base storage.KeyValueStoreT[T], key string) storage.ValueStoreT[T]
func WithPrefix ¶
func WithPrefix[T any](base storage.KeyValueStoreT[T], prefix string) storage.KeyValueStoreT[T]
Types ¶
type KeyValueStoreLocker ¶
type KeyValueStoreLocker[T any] interface { storage.KeyValueStoreT[T] sync.Locker }
func NewKeyValueStoreLocker ¶
func NewKeyValueStoreLocker[T any](s storage.KeyValueStoreT[T]) KeyValueStoreLocker[T]
type ValueStoreAdapter ¶
type ValueStoreAdapter[T any] struct { PutFunc func(ctx context.Context, value T, opts ...storage.PutOpt) error GetFunc func(ctx context.Context, opts ...storage.GetOpt) (T, error) WatchFunc func(ctx context.Context, opts ...storage.WatchOpt) (<-chan storage.WatchEvent[storage.KeyRevision[T]], error) DeleteFunc func(ctx context.Context, opts ...storage.DeleteOpt) error HistoryFunc func(ctx context.Context, opts ...storage.HistoryOpt) ([]storage.KeyRevision[T], error) }
func (ValueStoreAdapter[T]) History ¶
func (s ValueStoreAdapter[T]) History(ctx context.Context, opts ...storage.HistoryOpt) ([]storage.KeyRevision[T], error)
func (ValueStoreAdapter[T]) Watch ¶
func (s ValueStoreAdapter[T]) Watch(ctx context.Context, opts ...storage.WatchOpt) (<-chan storage.WatchEvent[storage.KeyRevision[T]], error)
type ValueStoreLocker ¶
type ValueStoreLocker[T any] interface { storage.ValueStoreT[T] sync.Locker }
func NewValueStoreLocker ¶
func NewValueStoreLocker[T any](s storage.ValueStoreT[T], mutex ...sync.Locker) ValueStoreLocker[T]
Click to show internal directories.
Click to hide internal directories.