frostfs-node/pkg/morph/client/container/estimations.go
Alex Vanin 83980ccb85 [#404] morph/client: Support notary calls in wrappers
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-03-04 12:39:15 +03:00

35 lines
665 B
Go

package container
import (
"github.com/pkg/errors"
)
type StartEstimation struct {
epoch int64
}
func (e *StartEstimation) SetEpoch(v int64) {
e.epoch = v
}
type StopEstimation struct {
epoch int64
}
func (e *StopEstimation) SetEpoch(v int64) {
e.epoch = v
}
func (c *Client) StartEstimation(args StartEstimation) error {
return errors.Wrapf(c.client.NotaryInvoke(
c.startEstimation,
args.epoch,
), "could not invoke method (%s)", c.startEstimation)
}
func (c *Client) StopEstimation(args StopEstimation) error {
return errors.Wrapf(c.client.NotaryInvoke(
c.stopEstimation,
args.epoch,
), "could not invoke method (%s)", c.stopEstimation)
}