Documentation
¶
Index ¶
- Constants
- type Config
- type SQLiteStore
- func (s *SQLiteStore) AtomicDelete(ctx context.Context, key string, previous *store.KVPair) (bool, error)
- func (s *SQLiteStore) AtomicPut(ctx context.Context, key string, value []byte, previous *store.KVPair, ...) (bool, *store.KVPair, error)
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) Delete(ctx context.Context, key string) error
- func (s *SQLiteStore) DeleteTree(ctx context.Context, directory string) error
- func (s *SQLiteStore) Exists(ctx context.Context, key string, opts *store.ReadOptions) (bool, error)
- func (s *SQLiteStore) Get(ctx context.Context, key string, opts *store.ReadOptions) (*store.KVPair, error)
- func (s *SQLiteStore) List(ctx context.Context, directory string, opts *store.ReadOptions) ([]*store.KVPair, error)
- func (s *SQLiteStore) NewLock(ctx context.Context, key string, opts *store.LockOptions) (store.Locker, error)
- func (s *SQLiteStore) Put(ctx context.Context, key string, value []byte, opts *store.WriteOptions) error
- func (s *SQLiteStore) Watch(ctx context.Context, key string, opts *store.ReadOptions) (<-chan *store.KVPair, error)
- func (s *SQLiteStore) WatchTree(ctx context.Context, directory string, opts *store.ReadOptions) (<-chan []*store.KVPair, error)
Constants ¶
View Source
const StoreName = "sqlite3kv"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func (*SQLiteStore) AtomicDelete ¶
func (s *SQLiteStore) AtomicDelete(ctx context.Context, key string, previous *store.KVPair) (bool, error)
AtomicDelete performs an atomic delete, ensuring that the current value matches the provided previous value
func (*SQLiteStore) AtomicPut ¶
func (s *SQLiteStore) AtomicPut(ctx context.Context, key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut performs an atomic put, ensuring that the current value matches the provided previous value
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
Close closes the database connection
func (*SQLiteStore) DeleteTree ¶
func (s *SQLiteStore) DeleteTree(ctx context.Context, directory string) error
func (*SQLiteStore) Exists ¶
func (s *SQLiteStore) Exists(ctx context.Context, key string, opts *store.ReadOptions) (bool, error)
Exists checks if a key exists in the key-value store
func (*SQLiteStore) Get ¶
func (s *SQLiteStore) Get(ctx context.Context, key string, opts *store.ReadOptions) (*store.KVPair, error)
func (*SQLiteStore) List ¶
func (s *SQLiteStore) List(ctx context.Context, directory string, opts *store.ReadOptions) ([]*store.KVPair, error)
func (*SQLiteStore) NewLock ¶
func (s *SQLiteStore) NewLock(ctx context.Context, key string, opts *store.LockOptions) (store.Locker, error)
NewLock creates a distributed lock for a given key
func (*SQLiteStore) Put ¶
func (s *SQLiteStore) Put(ctx context.Context, key string, value []byte, opts *store.WriteOptions) error
Click to show internal directories.
Click to hide internal directories.
