[#488] cmd/reputation/storage: Add consumers storage

Add consumer storage wrapper that implements
`WriterProvider` interface. Change field naming
in daughters storage package.

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-04-23 17:51:51 +03:00 committed by Alex Vanin
parent e8885d72f4
commit f7aa79f0b6
2 changed files with 55 additions and 2 deletions

View file

@ -8,7 +8,7 @@ import (
"github.com/nspcc-dev/neofs-node/pkg/util/logger"
)
type DaughterStorage struct {
type DaughterStorageWriterProvider struct {
Log *logger.Logger
Storage *daughters.Storage
}
@ -27,7 +27,7 @@ func (w *DaughterTrustWriter) Close() error {
return nil
}
func (s *DaughterStorage) InitWriter(_ reputationcommon.Context) (reputationcommon.Writer, error) {
func (s *DaughterStorageWriterProvider) InitWriter(_ reputationcommon.Context) (reputationcommon.Writer, error) {
return &DaughterTrustWriter{
log: s.Log,
storage: s.Storage,