MCPcopy
hub / github.com/cubefs/cubefs / newCmdFlashNodeHTTPStat

Function newCmdFlashNodeHTTPStat

cli/cmd/flashnode.go:188–207  ·  view source on GitHub ↗
(client *master.MasterClient)

Source from the content-addressed store, hash-verified

186}
187
188func newCmdFlashNodeHTTPStat(client *master.MasterClient) *cobra.Command {
189 return &cobra.Command{
190 Use: "httpStat" + _flashnodeAddr,
191 Short: "show flashnode stat",
192 Args: cobra.MinimumNArgs(1),
193 RunE: func(_ *cobra.Command, args []string) (err error) {
194 // check flashnode whether exist
195 _, err = client.NodeAPI().GetFlashNode(args[0])
196 if err != nil {
197 return
198 }
199 stat, err := httpclient.New().Addr(addr2Prof(args[0])).FlashNode().Stat()
200 if err != nil {
201 return
202 }
203 stdoutln(formatIndent(stat))
204 return
205 },
206 }
207}
208
209func newCmdFlashNodeHTTPStatAll(client *master.MasterClient) *cobra.Command {
210 return &cobra.Command{

Callers 1

newFlashNodeCmdFunction · 0.70

Calls 9

NewFunction · 0.92
NodeAPIMethod · 0.80
FlashNodeMethod · 0.80
addr2ProfFunction · 0.70
stdoutlnFunction · 0.70
formatIndentFunction · 0.70
StatMethod · 0.65
GetFlashNodeMethod · 0.45
AddrMethod · 0.45

Tested by

no test coverage detected