@@ -257,36 +257,47 @@ func initServerFlags(cmd *cobra.Command) {
257
257
viper .BindPFlags (cmd .Flags ())
258
258
}
259
259
260
+ func initClusterFlags (cmd * cobra.Command ) {
261
+ cmd .PersistentFlags ().StringVar (& cfgGroup , "cluster" , "" , "Cluster (default is none)" )
262
+ viper .BindPFlags (cmd .Flags ())
263
+ }
264
+
260
265
func init () {
261
266
262
267
rootClientCmd .AddCommand (clientConsoleCmd )
263
- //initApiServerFlags(clientConsoleCmd)
268
+ initServerApiFlags (clientConsoleCmd )
269
+ initClusterFlags (clientConsoleCmd )
264
270
265
271
rootClientCmd .AddCommand (switchoverCmd )
266
272
initSwitchoverFlags (switchoverCmd )
267
-
273
+ initClusterFlags ( switchoverCmd )
268
274
rootClientCmd .AddCommand (failoverCmd )
269
275
initFailoverFlags (failoverCmd )
270
-
276
+ initClusterFlags ( failoverCmd )
271
277
rootClientCmd .AddCommand (topologyCmd )
272
-
278
+ initClusterFlags ( topologyCmd )
273
279
rootClientCmd .AddCommand (apiCmd )
274
280
initApiFlags (apiCmd )
281
+ initClusterFlags (apiCmd )
275
282
276
283
rootClientCmd .AddCommand (regTestCmd )
277
284
initRegTestFlags (regTestCmd )
285
+ initClusterFlags (regTestCmd )
278
286
279
287
rootClientCmd .AddCommand (statusCmd )
280
288
initStatusFlags (statusCmd )
281
289
282
290
rootClientCmd .AddCommand (bootstrapCmd )
283
291
initBootstrapFlags (bootstrapCmd )
292
+ initClusterFlags (bootstrapCmd )
284
293
285
294
rootClientCmd .AddCommand (serverCmd )
286
295
initServerFlags (serverCmd )
296
+ initClusterFlags (serverCmd )
287
297
288
298
rootClientCmd .AddCommand (showCmd )
289
299
initShowFlags (showCmd )
300
+ initClusterFlags (showCmd )
290
301
291
302
rootClientCmd .AddCommand (configuratorCmd )
292
303
initConfiguratorFlags (showCmd )
0 commit comments