You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

status.go 691 B

12345678910111213141516171819202122232425262728293031323334
  1. package cluster
  2. import (
  3. "fmt"
  4. "github.com/spf13/cobra"
  5. cliapi "gitlink.org.cn/cloudream/jcs-pub/client/sdk/api/v1"
  6. "gitlink.org.cn/cloudream/jcs-pub/jcsctl/cmd"
  7. )
  8. func init() {
  9. var opt statusOpt
  10. cmd := cobra.Command{
  11. Use: "status",
  12. Args: cobra.ExactArgs(0),
  13. RunE: func(c *cobra.Command, args []string) error {
  14. ctx := cmd.GetCmdCtx(c)
  15. return status(c, ctx, opt, args)
  16. },
  17. }
  18. ClusterCmd.AddCommand(&cmd)
  19. }
  20. type statusOpt struct {
  21. }
  22. func status(c *cobra.Command, ctx *cmd.CommandContext, opt statusOpt, args []string) error {
  23. _, err := ctx.Client.Cluster().Status(cliapi.ClusterStatus{})
  24. if err != nil {
  25. return fmt.Errorf("get status: %v", err)
  26. }
  27. return nil
  28. }

本项目旨在将云际存储公共基础设施化,使个人及企业可低门槛使用高效的云际存储服务(安装开箱即用云际存储客户端即可,无需关注其他组件的部署),同时支持用户灵活便捷定制云际存储的功能细节。