MCPcopy Index your code
hub / github.com/deepflowio/deepflow / controllerSubCommand

Function controllerSubCommand

cli/ctl/server.go:43–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41}
42
43func controllerSubCommand() *cobra.Command {
44 controller := &cobra.Command{
45 Use: "controller",
46 Short: "server controller info",
47 Run: func(cmd *cobra.Command, args []string) {
48 fmt.Println("please run with 'list'")
49 },
50 }
51
52 list := &cobra.Command{
53 Use: "list",
54 Short: "list controller info",
55 Example: "deepflow-ctl server controller list",
56 Run: func(cmd *cobra.Command, args []string) {
57 listController(cmd)
58 },
59 }
60
61 controller.AddCommand(list)
62 return controller
63}
64
65func listController(cmd *cobra.Command) {
66 server := common.GetServerInfo(cmd)

Callers 1

RegisterServerCommandFunction · 0.85

Calls 1

listControllerFunction · 0.85

Tested by

no test coverage detected