frostfs-node/pkg/morph/client/container/estimations.go
Alex Vanin 70aa73cbd2 [#355] moprh/client: Add start/stop container estimation methods
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-01-29 11:23:37 +03:00

35 lines
653 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.Invoke(
c.startEstimation,
args.epoch,
), "could not invoke method (%s)", c.startEstimation)
}
func (c *Client) StopEstimation(args StopEstimation) error {
return errors.Wrapf(c.client.Invoke(
c.stopEstimation,
args.epoch,
), "could not invoke method (%s)", c.stopEstimation)
}