Documentation ¶
Index ¶
- Constants
- func GetKeyValueFromJsonMetric(metricRet string, key string) (string, *cmderror.CmdError)
- func GetMetricValue(metricRet string) (string, *cmderror.CmdError)
- func GetRpcListResponse(rpcList []*Rpc, rpcFunc []RpcFunc) ([]interface{}, []*cmderror.CmdError)
- func GetRpcResponse(rpc *Rpc, rpcFunc RpcFunc) (interface{}, *cmderror.CmdError)
- func NewFinalCurveCli(cli *FinalCurveCmd, funcs FinalCurveCmdFunc) *cobra.Command
- func NewMidCurveCli(cli *MidCurveCmd, add MidCurveCmdFunc) *cobra.Command
- func QueryMetric(m *Metric) (string, *cmderror.CmdError)
- type FinalCurveCmd
- type FinalCurveCmdFunc
- type Metric
- type MetricResult
- type MidCurveCmd
- type MidCurveCmdFunc
- type Result
- type Rpc
- type RpcFunc
- type RpcResult
Constants ¶
View Source
const (
CURL_VERSION = "curl/7.54.0"
)
Variables ¶
This section is empty.
Functions ¶
func GetRpcListResponse ¶
func GetRpcResponse ¶
func NewFinalCurveCli ¶
func NewFinalCurveCli(cli *FinalCurveCmd, funcs FinalCurveCmdFunc) *cobra.Command
func NewMidCurveCli ¶
func NewMidCurveCli(cli *MidCurveCmd, add MidCurveCmdFunc) *cobra.Command
Types ¶
type FinalCurveCmd ¶
type FinalCurveCmd struct { Use string `json:"-"` Short string `json:"-"` Long string `json:"-"` Example string `json:"-"` Error *cmderror.CmdError `json:"error"` Result interface{} `json:"result"` TableNew *tablewriter.Table `json:"-"` Header []string `json:"-"` Cmd *cobra.Command `json:"-"` }
FinalCurveCmd is the final executable command, it has no subcommands. The execution process is Init->RunCommand->Print. Error Use to indicate whether the command is wrong and the reason for the execution error
func (*FinalCurveCmd) SetHeader ¶
func (fc *FinalCurveCmd) SetHeader(header []string)
type FinalCurveCmdFunc ¶
type FinalCurveCmdFunc interface { Init(cmd *cobra.Command, args []string) error RunCommand(cmd *cobra.Command, args []string) error Print(cmd *cobra.Command, args []string) error // result in plain format string ResultPlainOutput() error AddFlags() }
FinalCurveCmdFunc is the function type for final command If there is flag[required] related code should not be placed in init, the check for it is placed between PreRun and Run
type MetricResult ¶
type MidCurveCmd ¶
MidCurveCmd is the middle command and has subcommands. If you execute this command you will be prompted which subcommands are included
type MidCurveCmdFunc ¶
type MidCurveCmdFunc interface {
AddSubCommands()
}
Add subcommand for MidCurveCmd
Directories ¶
Path | Synopsis |
---|---|
check/server
* Project: CurveCli * Created Date: 2023-05-07 * Author: pengpengSir
|
* Project: CurveCli * Created Date: 2023-05-07 * Author: pengpengSir |
create/dir
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
create/file
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
delete/snapshot
* Project: CurveCli * Created Date: 2023-11-10 * Author: ZackSoul
|
* Project: CurveCli * Created Date: 2023-11-10 * Author: ZackSoul |
list/chunkserver
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
list/space
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
query/chunkserver
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
query/pool
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
recover
* Project: CurveCli * Created Date: 2023-11-15 * Author: CrystalAnalyst
|
* Project: CurveCli * Created Date: 2023-11-15 * Author: CrystalAnalyst |
status/chunkserver
* Copyright (c) 2023 NetEase Inc.
|
* Copyright (c) 2023 NetEase Inc. |
stop
* Project: CurveCli * Created Date: 2023-11-02 * Author: ZackSoul
|
* Project: CurveCli * Created Date: 2023-11-02 * Author: ZackSoul |
stop/snapshot
* Project: CurveCli * Created Date: 2023-11-02 * Author: ZackSoul
|
* Project: CurveCli * Created Date: 2023-11-02 * Author: ZackSoul |
Click to show internal directories.
Click to hide internal directories.