forked from TrueCloudLab/frostfs-node
[#1367] writecache: Drop bbolt DB
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
66e17f4b8e
commit
5f6c7cbdb1
12 changed files with 82 additions and 415 deletions
|
@ -1,8 +1,6 @@
|
|||
package writecache
|
||||
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
|
@ -42,8 +40,6 @@ type options struct {
|
|||
noSync bool
|
||||
// reportError is the function called when encountering disk errors in background workers.
|
||||
reportError func(string, error)
|
||||
// openFile is the function called internally by bbolt to open database files. Useful for hermetic testing.
|
||||
openFile func(string, int, fs.FileMode) (*os.File, error)
|
||||
// metrics is metrics implementation
|
||||
metrics Metrics
|
||||
// disableBackgroundFlush is for testing purposes only.
|
||||
|
@ -155,13 +151,6 @@ func WithReportErrorFunc(f func(string, error)) Option {
|
|||
}
|
||||
}
|
||||
|
||||
// WithOpenFile sets the OpenFile function to use internally by bolt. Useful for hermetic testing.
|
||||
func WithOpenFile(f func(string, int, fs.FileMode) (*os.File, error)) Option {
|
||||
return func(o *options) {
|
||||
o.openFile = f
|
||||
}
|
||||
}
|
||||
|
||||
// WithMetrics sets metrics implementation.
|
||||
func WithMetrics(metrics Metrics) Option {
|
||||
return func(o *options) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue