2021-01-28 11:39:08 +00:00
|
|
|
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 {
|
2021-02-25 16:49:05 +00:00
|
|
|
return errors.Wrapf(c.client.NotaryInvoke(
|
2021-01-28 11:39:08 +00:00
|
|
|
c.startEstimation,
|
|
|
|
args.epoch,
|
|
|
|
), "could not invoke method (%s)", c.startEstimation)
|
|
|
|
}
|
|
|
|
|
|
|
|
func (c *Client) StopEstimation(args StopEstimation) error {
|
2021-02-25 16:49:05 +00:00
|
|
|
return errors.Wrapf(c.client.NotaryInvoke(
|
2021-01-28 11:39:08 +00:00
|
|
|
c.stopEstimation,
|
|
|
|
args.epoch,
|
|
|
|
), "could not invoke method (%s)", c.stopEstimation)
|
|
|
|
}
|