(client *master.MasterClient)
| 186 | } |
| 187 | |
| 188 | func 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 | |
| 209 | func newCmdFlashNodeHTTPStatAll(client *master.MasterClient) *cobra.Command { |
| 210 | return &cobra.Command{ |
no test coverage detected