nspcc-dev/neofs-node

node: Refactor using `StorageEngine` in `Object` service

开放

#1,834 创建于 2022年10月4日

 (0 条评论) (0 个反应) (0 位负责人)Go (49 个派生)auto 404
I4S2U4enhancementgood first issueneofs-storage

仓库指标

星标
 (36 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Object service server of storage node uses engine.StorageEngine type directly almost everywhere. Such code architecture doesn't allow to tune local storage behavior. For example, in #1798 there was a need to block all local operations, but on Object server only: Control service should still call the engine.

I propose to refactor engine's usage as it done it ObjectService.Put server

https://github.com/nspcc-dev/neofs-node/blob/4eb0ed11f8e56beee3dfbee632cb4b9cad3bb47c/pkg/services/object/put/local.go#L11-L16

Each component should precisely document expected behavior of local object storage by itself via locally defined interface. As a bonus, instance can be easily mocked for testing.

贡献者指南