-
-
Notifications
You must be signed in to change notification settings - Fork 835
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(storage): BuntDB initialization and locking mechanism (#781)
- Update `github.com/tidwall/buntdb` dependency from v1.3.0 to v1.3.1 - Modify `buntdb.New` initialization to use `conf.Stat.BuntDB.Path` - Remove explicit lock field in `Storage` struct and use embedded `sync.RWMutex` - Change lock usage in `Storage` methods to use embedded `sync.RWMutex` methods - Add `os` package import in `buntdb.go` - Refactor `New` function in `buntdb.go` to accept `dbPath` string instead of `config` - Update `Init` method in `buntdb.go` to handle empty `dbPath` by setting it to a temporary directory - Remove `os` and `config` imports from `buntdb_test.go` - Simplify `TestBuntDBEngine` by removing configuration loading and file existence checks - Add test steps to reset and verify the value of a key in `TestBuntDBEngine` Signed-off-by: appleboy <appleboy.tw@gmail.com>
- Loading branch information
Showing
6 changed files
with
34 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters