forked from TrueCloudLab/frostfs-node
[#488] cmd/reputation: Add DaughterStorage
Add `DaughterStorage` init in main pkg and start write all received daughters' trusts to it. Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
56b3e35779
commit
f6783f4f81
8 changed files with 53 additions and 37 deletions
|
@ -65,7 +65,7 @@ func (r *Router) InitWriter(ctx common.Context) (common.Writer, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
func (w *trustWriter) Write(t reputation.Trust) error {
|
||||
func (w *trustWriter) Write(ctx common.Context, t reputation.Trust) error {
|
||||
w.routeMtx.Lock()
|
||||
defer w.routeMtx.Unlock()
|
||||
|
||||
|
@ -106,7 +106,7 @@ func (w *trustWriter) Write(t reputation.Trust) error {
|
|||
w.mServers[endpoint] = remoteWriter
|
||||
}
|
||||
|
||||
err := remoteWriter.Write(t)
|
||||
err := remoteWriter.Write(ctx, t)
|
||||
if err != nil {
|
||||
w.router.log.Debug("could not write the value",
|
||||
zap.String("error", err.Error()),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue