frostfs-node/cmd/frostfs-lens/internal/blobovnicza/root.go

34 lines
692 B
Go
Raw Permalink Normal View History

package blobovnicza
import (
common "git.frostfs.info/TrueCloudLab/frostfs-node/cmd/frostfs-lens/internal"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/local_object_storage/blobovnicza"
"github.com/spf13/cobra"
)
var (
vAddress string
vPath string
vOut string
)
// Root contains `blobovnicza` command definition.
var Root = &cobra.Command{
Use: "blobovnicza",
Short: "Operations with a blobovnicza",
}
func init() {
Root.AddCommand(listCMD, inspectCMD)
}
func openBlobovnicza(cmd *cobra.Command) *blobovnicza.Blobovnicza {
blz := blobovnicza.New(
blobovnicza.WithPath(vPath),
blobovnicza.WithReadOnly(true),
)
common.ExitOnErr(cmd, blz.Open())
return blz
}