forked from TrueCloudLab/frostfs-node
[#1437] node: Fix contextcheck linter
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
6921a89061
commit
7429553266
209 changed files with 1068 additions and 1036 deletions
|
@ -1,6 +1,8 @@
|
|||
package writecache
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
@ -29,7 +31,7 @@ type options struct {
|
|||
// noSync is true iff FSTree allows unsynchronized writes.
|
||||
noSync bool
|
||||
// reportError is the function called when encountering disk errors in background workers.
|
||||
reportError func(string, error)
|
||||
reportError func(context.Context, string, error)
|
||||
// metrics is metrics implementation
|
||||
metrics Metrics
|
||||
// disableBackgroundFlush is for testing purposes only.
|
||||
|
@ -108,7 +110,7 @@ func WithNoSync(noSync bool) Option {
|
|||
}
|
||||
|
||||
// WithReportErrorFunc sets error reporting function.
|
||||
func WithReportErrorFunc(f func(string, error)) Option {
|
||||
func WithReportErrorFunc(f func(context.Context, string, error)) Option {
|
||||
return func(o *options) {
|
||||
o.reportError = f
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue