+
+func xdsStatus(ctx *cli.Context) error {
+ cfg := xaapiv1.APIConfig{}
+ if err := XdsConfigGet(&cfg); err != nil {
+ return cli.NewExitError(err.Error(), 1)
+ }
+
+ writer := NewTableWriter()
+ fmt.Fprintln(writer, "XDS Server:")
+ for _, svr := range cfg.Servers {
+ fmt.Fprintln(writer, " ID:\t", svr.ID)
+ fmt.Fprintln(writer, " URL:\t", svr.URL)
+ fmt.Fprintln(writer, " Connected:\t", svr.Connected)
+ fmt.Fprintln(writer, " Connection retry:\t", svr.ConnRetry)
+ fmt.Fprintln(writer, " Disabled:\t", svr.Disabled)
+ }
+ writer.Flush()
+
+ return nil
+}