frostfs-node/pkg/morph/client/container/estimations.go
Pavel Karpy 752efc6f8c [#584] pkg/innerring: Delete using deprecated methods
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-03 13:59:59 +03:00

35 lines
713 B
Go

package container
import (
"fmt"
)
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 {
if err := c.client.Invoke(c.startEstimation, args.epoch); err != nil {
return fmt.Errorf("could not invoke method (%s): %w", c.startEstimation, err)
}
return nil
}
func (c *Client) StopEstimation(args StopEstimation) error {
if err := c.client.Invoke(c.stopEstimation, args.epoch); err != nil {
return fmt.Errorf("could not invoke method (%s): %w", c.stopEstimation, err)
}
return nil
}