Versions in this module Expand all Collapse all v0 v0.1.2 Aug 24, 2024 Changes in this version + const LocksBucket + var ErrBucketNotFound = errors.New("bucket not found") + var ErrIncompatibleValue = errors.New("incompatible value") + var ErrLockNotFound = errors.New("lock not found") + var ErrLocksBucketNotFound = errors.New("locks bucket not found") + var ErrNoBucket = errors.New("no bucket provided") + var ErrNotOwner = errors.New("not the lock owner") + func Traverse(t *bolt.Tx, buckets []string) (*bolt.Bucket, error) + func TraverseCreate(t *bolt.Tx, buckets []string) (*bolt.Bucket, error) + type CapybaraDB struct + func NewCapybaraDB(conf *cmd.Conf, l zerolog.Logger) (*CapybaraDB, error) + func (c *CapybaraDB) Close() error + func (cdb *CapybaraDB) ClaimLock(key, owner string, pttl *time.Duration) (*pb.Lock, bool, error) + func (cdb *CapybaraDB) Delete(buckets []string, key string) error + func (cdb *CapybaraDB) DeletePath(path, sep string) error + func (cdb *CapybaraDB) Get(buckets []string, key string) ([]byte, error) + func (cdb *CapybaraDB) GetPath(path, sep string) ([]byte, error) + func (cdb *CapybaraDB) Put(buckets []string, key string, value []byte) error + func (cdb *CapybaraDB) PutPath(path, sep string, value []byte) error + func (cdb *CapybaraDB) ReleaseLock(key, owner string) error