forked from TrueCloudLab/frostfs-api-go
[#274] pkg/client: Add epoch
field to SendIntermediateTrustPrm
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
541a56aae1
commit
0f7a14a69f
1 changed files with 11 additions and 0 deletions
|
@ -87,11 +87,21 @@ func (c *clientImpl) SendLocalTrust(ctx context.Context, prm SendLocalTrustPrm,
|
||||||
|
|
||||||
// SendIntermediateTrustPrm groups parameters of SendIntermediateTrust operation.
|
// SendIntermediateTrustPrm groups parameters of SendIntermediateTrust operation.
|
||||||
type SendIntermediateTrustPrm struct {
|
type SendIntermediateTrustPrm struct {
|
||||||
|
epoch uint64
|
||||||
|
|
||||||
iter uint32
|
iter uint32
|
||||||
|
|
||||||
trust *reputation.PeerToPeerTrust
|
trust *reputation.PeerToPeerTrust
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *SendIntermediateTrustPrm) Epoch() uint64 {
|
||||||
|
return x.epoch
|
||||||
|
}
|
||||||
|
|
||||||
|
func (x *SendIntermediateTrustPrm) SetEpoch(epoch uint64) {
|
||||||
|
x.epoch = epoch
|
||||||
|
}
|
||||||
|
|
||||||
// Iteration returns sequence number of the iteration.
|
// Iteration returns sequence number of the iteration.
|
||||||
func (x SendIntermediateTrustPrm) Iteration() uint32 {
|
func (x SendIntermediateTrustPrm) Iteration() uint32 {
|
||||||
return x.iter
|
return x.iter
|
||||||
|
@ -124,6 +134,7 @@ func (c *clientImpl) SendIntermediateTrust(ctx context.Context, prm SendIntermed
|
||||||
}
|
}
|
||||||
|
|
||||||
reqBody := new(v2reputation.SendIntermediateResultRequestBody)
|
reqBody := new(v2reputation.SendIntermediateResultRequestBody)
|
||||||
|
reqBody.SetEpoch(prm.Epoch())
|
||||||
reqBody.SetIteration(prm.Iteration())
|
reqBody.SetIteration(prm.Iteration())
|
||||||
reqBody.SetTrust(prm.Trust().ToV2())
|
reqBody.SetTrust(prm.Trust().ToV2())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue