forked from TrueCloudLab/frostfs-node
Alex Vanin
20de74a505
Due to source code relocation from GitHub. Signed-off-by: Alex Vanin <a.vanin@yadro.com>
20 lines
440 B
Go
20 lines
440 B
Go
package netmap
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
|
|
)
|
|
|
|
// NewEpoch updates FrostFS epoch number through
|
|
// Netmap contract call.
|
|
func (c *Client) NewEpoch(epoch uint64) error {
|
|
prm := client.InvokePrm{}
|
|
prm.SetMethod(newEpochMethod)
|
|
prm.SetArgs(epoch)
|
|
|
|
if err := c.client.Invoke(prm); err != nil {
|
|
return fmt.Errorf("could not invoke method (%s): %w", newEpochMethod, err)
|
|
}
|
|
return nil
|
|
}
|