()
| 102 | } |
| 103 | |
| 104 | func ingesterSubCommand() *cobra.Command { |
| 105 | ingester := &cobra.Command{ |
| 106 | Use: "ingester", |
| 107 | Short: "server ingester info", |
| 108 | Run: func(cmd *cobra.Command, args []string) { |
| 109 | fmt.Println("please run with 'list'") |
| 110 | }, |
| 111 | } |
| 112 | |
| 113 | list := &cobra.Command{ |
| 114 | Use: "list", |
| 115 | Short: "list ingester info", |
| 116 | Example: "deepflow-ctl server ingester list", |
| 117 | Run: func(cmd *cobra.Command, args []string) { |
| 118 | listIngerter(cmd) |
| 119 | }, |
| 120 | } |
| 121 | |
| 122 | ingester.AddCommand(list) |
| 123 | |
| 124 | return ingester |
| 125 | } |
| 126 | |
| 127 | func listIngerter(cmd *cobra.Command) { |
| 128 | server := common.GetServerInfo(cmd) |
no test coverage detected