[#1461] shard: Fix option naming

`WitDeletedLockCallback` => `WithDeletedLockCallback`.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-06-06 17:01:21 +03:00 committed by fyrchik
parent 5122be34e7
commit 63c00e785d
3 changed files with 4 additions and 4 deletions

View file

@ -38,7 +38,7 @@ func (e *StorageEngine) AddShard(opts ...shard.Option) (*shard.ID, error) {
shard.WithID(id),
shard.WithExpiredTombstonesCallback(e.processExpiredTombstones),
shard.WithExpiredLocksCallback(e.processExpiredLocks),
shard.WitDeletedLockCallback(e.processDeletedLocks),
shard.WithDeletedLockCallback(e.processDeletedLocks),
)...)
if err := sh.UpdateID(); err != nil {

View file

@ -33,7 +33,7 @@ func TestShard_Lock(t *testing.T) {
shard.WithMetaBaseOptions(
meta.WithPath(filepath.Join(rootPath, "meta")),
),
shard.WitDeletedLockCallback(func(_ context.Context, addresses []oid.Address) {
shard.WithDeletedLockCallback(func(_ context.Context, addresses []oid.Address) {
sh.HandleDeletedLocks(addresses)
}),
}

View file

@ -234,9 +234,9 @@ func WithTombstoneSource(v TombstoneSource) Option {
}
}
// WitDeletedLockCallback returns option to specify callback
// WithDeletedLockCallback returns option to specify callback
// of the deleted LOCK objects handler.
func WitDeletedLockCallback(v DeletedLockCallback) Option {
func WithDeletedLockCallback(v DeletedLockCallback) Option {
return func(c *cfg) {
c.deletedLockCallBack = v
}