forked from TrueCloudLab/frostfs-node
[#787] cli: Add vub
for control ir
commands
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
bdfa523487
commit
5466e88444
5 changed files with 38 additions and 5 deletions
|
@ -1,6 +1,9 @@
|
|||
package control
|
||||
|
||||
import "github.com/spf13/cobra"
|
||||
import (
|
||||
commonCmd "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/internal/common"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var irCmd = &cobra.Command{
|
||||
Use: "ir",
|
||||
|
@ -19,3 +22,13 @@ func initControlIRCmd() {
|
|||
initControlIRHealthCheckCmd()
|
||||
initControlIRRemoveContainerCmd()
|
||||
}
|
||||
|
||||
func printVUB(cmd *cobra.Command, vub uint32) {
|
||||
cmd.Printf("Transaction's valid until block is %d\n", vub)
|
||||
}
|
||||
|
||||
func parseVUB(cmd *cobra.Command) uint32 {
|
||||
vub, err := cmd.Flags().GetUint32(irFlagNameVUB)
|
||||
commonCmd.ExitOnErr(cmd, "invalid valid until block value: %w", err)
|
||||
return vub
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue