forked from TrueCloudLab/frostfs-node
[#270] Add IR epoch tick control call
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
58f1ba4b51
commit
ff25521204
20 changed files with 711 additions and 127 deletions
|
@ -8,10 +8,14 @@ import (
|
|||
|
||||
// NewEpoch updates FrostFS epoch number through
|
||||
// Netmap contract call.
|
||||
func (c *Client) NewEpoch(epoch uint64) error {
|
||||
// If `force` is true, this call is normally initiated by a control
|
||||
// service command and uses a control notary transaction internally
|
||||
// to ensure all nodes produce the same transaction with high probability.
|
||||
func (c *Client) NewEpoch(epoch uint64, force bool) error {
|
||||
prm := client.InvokePrm{}
|
||||
prm.SetMethod(newEpochMethod)
|
||||
prm.SetArgs(epoch)
|
||||
prm.SetControlTX(force)
|
||||
|
||||
if err := c.client.Invoke(prm); err != nil {
|
||||
return fmt.Errorf("could not invoke method (%s): %w", newEpochMethod, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue