diff --git a/cmd/kubevpn/cmds/alias.go b/cmd/kubevpn/cmds/alias.go index f1aa0187..31f68287 100644 --- a/cmd/kubevpn/cmds/alias.go +++ b/cmd/kubevpn/cmds/alias.go @@ -77,30 +77,10 @@ Config file support three field: Name,Needs,Flags }, Args: cobra.MatchAll(cobra.ExactArgs(1)), RunE: func(cmd *cobra.Command, args []string) error { - var content []byte - var err error - var path string - if localFile != "" { - path = localFile - content, err = os.ReadFile(path) - } else if remoteAddr != "" { - path = remoteAddr - content, err = util.DownloadFileStream(path) - } else { - path = daemon.GetConfigFilePath() - content, err = os.ReadFile(path) - } + configs, err := ParseAndGet(localFile, remoteAddr, args[0]) if err != nil { return err } - configList, err := ParseConfig(content) - if err != nil { - return err - } - configs, err := GetConfigs(configList, args[0]) - if len(configs) == 0 { - return fmt.Errorf("can not found any alias for name %s, please check your config file %s", args[0], path) - } name, err := os.Executable() if err != nil { return err @@ -124,6 +104,38 @@ Config file support three field: Name,Needs,Flags return cmd } +func ParseAndGet(localFile, remoteAddr string, aliasName string) ([]Config, error) { + var content []byte + var err error + var path string + if localFile != "" { + path = localFile + content, err = os.ReadFile(path) + } else if remoteAddr != "" { + path = remoteAddr + content, err = util.DownloadFileStream(path) + } else { + path = daemon.GetConfigFilePath() + content, err = os.ReadFile(path) + } + if err != nil { + return nil, err + } + list, err := ParseConfig(content) + if err != nil { + return nil, err + } + configs, err := GetConfigs(list, aliasName) + if err != nil { + return nil, err + } + if len(configs) == 0 { + err = fmt.Errorf("can not found any alias for name %s, please check your config file %s", aliasName, path) + return nil, err + } + return configs, nil +} + func ParseConfig(file []byte) ([]Config, error) { decoder := yaml.NewDecoder(strings.NewReader(string(file))) var configs []Config diff --git a/cmd/kubevpn/cmds/clone.go b/cmd/kubevpn/cmds/clone.go index fd47d223..4a6cf994 100644 --- a/cmd/kubevpn/cmds/clone.go +++ b/cmd/kubevpn/cmds/clone.go @@ -145,8 +145,8 @@ func CmdClone(f cmdutil.Factory) *cobra.Command { cmd.Flags().StringVar(&options.TargetKubeconfig, "target-kubeconfig", "", "Clone workloads will create in this cluster, if not special, use origin cluster") cmd.Flags().StringVar(&options.TargetRegistry, "target-registry", "", "Clone workloads will create this registry domain to replace origin registry, if not special, use origin registry") - addExtraRoute(cmd, extraRoute) - addSshFlags(cmd, sshConf) + addExtraRoute(cmd.Flags(), extraRoute) + addSshFlags(cmd.Flags(), sshConf) cmd.ValidArgsFunction = utilcomp.ResourceTypeAndNameCompletionFunc(f) return cmd } diff --git a/cmd/kubevpn/cmds/config.go b/cmd/kubevpn/cmds/config.go index ee8e2c40..1bc17b45 100644 --- a/cmd/kubevpn/cmds/config.go +++ b/cmd/kubevpn/cmds/config.go @@ -63,7 +63,7 @@ func cmdConfigAdd(f cmdutil.Factory) *cobra.Command { return nil }, } - addSshFlags(cmd, sshConf) + addSshFlags(cmd.Flags(), sshConf) return cmd } diff --git a/cmd/kubevpn/cmds/connect.go b/cmd/kubevpn/cmds/connect.go index 1f8ade1d..d2c001e0 100644 --- a/cmd/kubevpn/cmds/connect.go +++ b/cmd/kubevpn/cmds/connect.go @@ -152,7 +152,7 @@ func CmdConnect(f cmdutil.Factory) *cobra.Command { cmd.Flags().BoolVar(&foreground, "foreground", false, "Hang up") cmd.Flags().BoolVar(&lite, "lite", false, "connect to multiple cluster in lite mode, you needs to special this options") - addExtraRoute(cmd, extraRoute) - addSshFlags(cmd, sshConf) + addExtraRoute(cmd.Flags(), extraRoute) + addSshFlags(cmd.Flags(), sshConf) return cmd } diff --git a/cmd/kubevpn/cmds/cp.go b/cmd/kubevpn/cmds/cp.go index 95f34f8c..cc2cb05a 100644 --- a/cmd/kubevpn/cmds/cp.go +++ b/cmd/kubevpn/cmds/cp.go @@ -134,6 +134,6 @@ func CmdCp(f cmdutil.Factory) *cobra.Command { cmd.Flags().BoolVarP(&o.NoPreserve, "no-preserve", "", false, "The copied file/directory's ownership and permissions will not be preserved in the container") cmd.Flags().IntVarP(&o.MaxTries, "retries", "", 0, "Set number of retries to complete a copy operation from a container. Specify 0 to disable or any negative value for infinite retrying. The default is 0 (no retry).") - addSshFlags(cmd, sshConf) + addSshFlags(cmd.Flags(), sshConf) return cmd } diff --git a/cmd/kubevpn/cmds/dev.go b/cmd/kubevpn/cmds/dev.go index 086d43e9..c29c60d3 100644 --- a/cmd/kubevpn/cmds/dev.go +++ b/cmd/kubevpn/cmds/dev.go @@ -160,7 +160,7 @@ Startup your kubernetes workloads in local Docker container with same volume态e dockercomp.NetworkNames(cli), ) - addExtraRoute(cmd, &options.ExtraRouteInfo) - addSshFlags(cmd, sshConf) + addExtraRoute(cmd.Flags(), &options.ExtraRouteInfo) + addSshFlags(cmd.Flags(), sshConf) return cmd } diff --git a/cmd/kubevpn/cmds/disconnect.go b/cmd/kubevpn/cmds/disconnect.go index cf4f4283..b5414942 100644 --- a/cmd/kubevpn/cmds/disconnect.go +++ b/cmd/kubevpn/cmds/disconnect.go @@ -20,6 +20,7 @@ import ( func CmdDisconnect(f cmdutil.Factory) *cobra.Command { var all = false + var clusterIDs []string cmd := &cobra.Command{ Use: "disconnect", Short: i18n.T("Disconnect from kubernetes cluster network"), @@ -35,10 +36,13 @@ func CmdDisconnect(f cmdutil.Factory) *cobra.Command { Args: cobra.MatchAll(cobra.OnlyValidArgs), RunE: func(cmd *cobra.Command, args []string) error { if len(args) > 0 && all { - return fmt.Errorf("either specify --all or specific ID, not both") + return fmt.Errorf("either specify --all or ID, not both") } - if len(args) == 0 && !all { - return fmt.Errorf("either specify --all or specific ID") + if len(clusterIDs) > 0 && all { + return fmt.Errorf("either specify --all or cluster-id, not both") + } + if len(args) == 0 && !all && len(clusterIDs) == 0 { + return fmt.Errorf("either specify --all or ID or cluster-id") } var ids *int32 if len(args) > 0 { @@ -51,8 +55,9 @@ func CmdDisconnect(f cmdutil.Factory) *cobra.Command { client, err := daemon.GetClient(false).Disconnect( cmd.Context(), &rpc.DisconnectRequest{ - ID: ids, - All: pointer.Bool(all), + ID: ids, + ClusterIDs: clusterIDs, + All: pointer.Bool(all), }, ) var resp *rpc.DisconnectResponse @@ -72,6 +77,7 @@ func CmdDisconnect(f cmdutil.Factory) *cobra.Command { return nil }, } - cmd.Flags().BoolVar(&all, "all", all, "Select all, disconnect from all cluster network") + cmd.Flags().BoolVar(&all, "all", all, "Disconnect all cluster, disconnect from all cluster network") + cmd.Flags().StringArrayVar(&clusterIDs, "cluster-id", []string{}, "Cluster id, command status -o yaml/json will show cluster-id") return cmd } diff --git a/cmd/kubevpn/cmds/proxy.go b/cmd/kubevpn/cmds/proxy.go index 73d3891e..05179451 100644 --- a/cmd/kubevpn/cmds/proxy.go +++ b/cmd/kubevpn/cmds/proxy.go @@ -8,6 +8,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/cobra" + flag "github.com/spf13/pflag" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" cmdutil "k8s.io/kubectl/pkg/cmd/util" @@ -173,29 +174,29 @@ func CmdProxy(f cmdutil.Factory) *cobra.Command { cmd.Flags().StringVar((*string)(&connect.Engine), "engine", string(config.EngineRaw), fmt.Sprintf(`transport engine ("%s"|"%s") %s: use gvisor and raw both (both performance and stable), %s: use raw mode (best stable)`, config.EngineMix, config.EngineRaw, config.EngineMix, config.EngineRaw)) cmd.Flags().BoolVar(&foreground, "foreground", false, "foreground hang up") - addExtraRoute(cmd, extraRoute) - addSshFlags(cmd, sshConf) + addExtraRoute(cmd.Flags(), extraRoute) + addSshFlags(cmd.Flags(), sshConf) cmd.ValidArgsFunction = utilcomp.ResourceTypeAndNameCompletionFunc(f) return cmd } -func addSshFlags(cmd *cobra.Command, sshConf *util.SshConfig) { +func addSshFlags(flags *flag.FlagSet, sshConf *util.SshConfig) { // for ssh jumper host - cmd.Flags().StringVar(&sshConf.Addr, "ssh-addr", "", "Optional ssh jump server address to dial as :, eg: 127.0.0.1:22") - cmd.Flags().StringVar(&sshConf.User, "ssh-username", "", "Optional username for ssh jump server") - cmd.Flags().StringVar(&sshConf.Password, "ssh-password", "", "Optional password for ssh jump server") - cmd.Flags().StringVar(&sshConf.Keyfile, "ssh-keyfile", "", "Optional file with private key for SSH authentication") - cmd.Flags().StringVar(&sshConf.ConfigAlias, "ssh-alias", "", "Optional config alias with ~/.ssh/config for SSH authentication") - cmd.Flags().StringVar(&sshConf.GSSAPIPassword, "gssapi-password", "", "GSSAPI password") - cmd.Flags().StringVar(&sshConf.GSSAPIKeytabConf, "gssapi-keytab", "", "GSSAPI keytab file path") - cmd.Flags().StringVar(&sshConf.GSSAPICacheFile, "gssapi-cache", "", "GSSAPI cache file path, use command `kinit -c /path/to/cache USERNAME@RELAM` to generate") - cmd.Flags().StringVar(&sshConf.RemoteKubeconfig, "remote-kubeconfig", "", "Remote kubeconfig abstract path of ssh server, default is /home/$USERNAME/.kube/config") - lookup := cmd.Flags().Lookup("remote-kubeconfig") + flags.StringVar(&sshConf.Addr, "ssh-addr", "", "Optional ssh jump server address to dial as :, eg: 127.0.0.1:22") + flags.StringVar(&sshConf.User, "ssh-username", "", "Optional username for ssh jump server") + flags.StringVar(&sshConf.Password, "ssh-password", "", "Optional password for ssh jump server") + flags.StringVar(&sshConf.Keyfile, "ssh-keyfile", "", "Optional file with private key for SSH authentication") + flags.StringVar(&sshConf.ConfigAlias, "ssh-alias", "", "Optional config alias with ~/.ssh/config for SSH authentication") + flags.StringVar(&sshConf.GSSAPIPassword, "gssapi-password", "", "GSSAPI password") + flags.StringVar(&sshConf.GSSAPIKeytabConf, "gssapi-keytab", "", "GSSAPI keytab file path") + flags.StringVar(&sshConf.GSSAPICacheFile, "gssapi-cache", "", "GSSAPI cache file path, use command `kinit -c /path/to/cache USERNAME@RELAM` to generate") + flags.StringVar(&sshConf.RemoteKubeconfig, "remote-kubeconfig", "", "Remote kubeconfig abstract path of ssh server, default is /home/$USERNAME/.kube/config") + lookup := flags.Lookup("remote-kubeconfig") lookup.NoOptDefVal = "~/.kube/config" } -func addExtraRoute(cmd *cobra.Command, route *handler.ExtraRouteInfo) { - cmd.Flags().StringArrayVar(&route.ExtraCIDR, "extra-cidr", []string{}, "Extra cidr string, add those cidr network to route table, eg: --extra-cidr 192.168.0.159/24 --extra-cidr 192.168.1.160/32") - cmd.Flags().StringArrayVar(&route.ExtraDomain, "extra-domain", []string{}, "Extra domain string, the resolved ip will add to route table, eg: --extra-domain test.abc.com --extra-domain foo.test.com") - cmd.Flags().BoolVar(&route.ExtraNodeIP, "extra-node-ip", false, "Extra node ip, add cluster node ip to route table.") +func addExtraRoute(flags *flag.FlagSet, route *handler.ExtraRouteInfo) { + flags.StringArrayVar(&route.ExtraCIDR, "extra-cidr", []string{}, "Extra cidr string, add those cidr network to route table, eg: --extra-cidr 192.168.0.159/24 --extra-cidr 192.168.1.160/32") + flags.StringArrayVar(&route.ExtraDomain, "extra-domain", []string{}, "Extra domain string, the resolved ip will add to route table, eg: --extra-domain test.abc.com --extra-domain foo.test.com") + flags.BoolVar(&route.ExtraNodeIP, "extra-node-ip", false, "Extra node ip, add cluster node ip to route table.") } diff --git a/cmd/kubevpn/cmds/reset.go b/cmd/kubevpn/cmds/reset.go index cf76b82f..38f77af7 100644 --- a/cmd/kubevpn/cmds/reset.go +++ b/cmd/kubevpn/cmds/reset.go @@ -80,7 +80,7 @@ func CmdReset(f cmdutil.Factory) *cobra.Command { }, } - addSshFlags(cmd, sshConf) + addSshFlags(cmd.Flags(), sshConf) return cmd } diff --git a/cmd/kubevpn/cmds/ssh.go b/cmd/kubevpn/cmds/ssh.go index 3b7a5117..af5648ec 100644 --- a/cmd/kubevpn/cmds/ssh.go +++ b/cmd/kubevpn/cmds/ssh.go @@ -111,7 +111,7 @@ func CmdSSH(_ cmdutil.Factory) *cobra.Command { } }, } - addSshFlags(cmd, sshConf) + addSshFlags(cmd.Flags(), sshConf) cmd.Flags().StringArrayVar(&ExtraCIDR, "extra-cidr", []string{}, "Extra cidr string, eg: --extra-cidr 192.168.0.159/24 --extra-cidr 192.168.1.160/32") return cmd } diff --git a/cmd/kubevpn/cmds/status.go b/cmd/kubevpn/cmds/status.go index cba633df..7addaee7 100644 --- a/cmd/kubevpn/cmds/status.go +++ b/cmd/kubevpn/cmds/status.go @@ -1,19 +1,38 @@ package cmds import ( + "bytes" + "encoding/json" "fmt" "os" + "strings" + "text/tabwriter" "github.com/spf13/cobra" + flag "github.com/spf13/pflag" + "k8s.io/cli-runtime/pkg/genericclioptions" cmdutil "k8s.io/kubectl/pkg/cmd/util" "k8s.io/kubectl/pkg/util/i18n" "k8s.io/kubectl/pkg/util/templates" + "sigs.k8s.io/yaml" "github.com/wencaiwulue/kubevpn/v2/pkg/daemon" "github.com/wencaiwulue/kubevpn/v2/pkg/daemon/rpc" + "github.com/wencaiwulue/kubevpn/v2/pkg/handler" + "github.com/wencaiwulue/kubevpn/v2/pkg/util" +) + +const ( + FormatJson = "json" + FormatYaml = "yaml" + FormatTable = "table" ) func CmdStatus(f cmdutil.Factory) *cobra.Command { + var aliasName string + var localFile string + var remoteAddr string + var format string cmd := &cobra.Command{ Use: "status", Short: i18n.T("KubeVPN status"), @@ -21,21 +40,141 @@ func CmdStatus(f cmdutil.Factory) *cobra.Command { Example: templates.Examples(i18n.T(` # show status for kubevpn status kubevpn status + + # query status by alias config name dev_new + kubevpn status --alias dev_new `)), PreRunE: func(cmd *cobra.Command, args []string) (err error) { return daemon.StartupDaemon(cmd.Context()) }, RunE: func(cmd *cobra.Command, args []string) error { - client, err := daemon.GetClient(false).Status( + var clusterIDs []string + if aliasName != "" { + configs, err := ParseAndGet(localFile, remoteAddr, aliasName) + if err != nil { + return err + } + for _, config := range configs { + clusterID, err := GetClusterIDByConfig(cmd, config) + if err != nil { + return err + } + clusterIDs = append(clusterIDs, clusterID) + } + } + + resp, err := daemon.GetClient(false).Status( cmd.Context(), - &rpc.StatusRequest{}, + &rpc.StatusRequest{ + ClusterIDs: clusterIDs, + }, ) if err != nil { return err } - fmt.Fprint(os.Stdout, client.GetMessage()) + output, err := genOutput(resp, format) + if err != nil { + return err + } + fmt.Fprint(os.Stdout, output) return nil }, } + cmd.Flags().StringVar(&aliasName, "alias", "", "Alias name, query connect status by alias config name") + cmd.Flags().StringVarP(&localFile, "file", "f", daemon.GetConfigFilePath(), "Config file location") + cmd.Flags().StringVarP(&remoteAddr, "remote", "r", "", "Remote config file, eg: https://raw.githubusercontent.com/kubenetworks/kubevpn/master/pkg/config/config.yaml") + cmd.Flags().StringVarP(&format, "output", "o", FormatTable, fmt.Sprintf("Output format. One of: (%s, %s, %s)", FormatJson, FormatYaml, FormatTable)) return cmd } + +func genOutput(status *rpc.StatusResponse, format string) (string, error) { + switch format { + case FormatJson: + if len(status.List) == 0 { + return "", nil + } + marshal, err := json.Marshal(status.List) + if err != nil { + return "", err + } + return string(marshal), nil + + case FormatYaml: + if len(status.List) == 0 { + return "", nil + } + marshal, err := yaml.Marshal(status.List) + if err != nil { + return "", err + } + return string(marshal), nil + default: + var sb = new(bytes.Buffer) + w := tabwriter.NewWriter(sb, 1, 1, 1, ' ', 0) + _, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "ID", "Mode", "Cluster", "Kubeconfig", "Namespace", "Status", "Netif") + + for _, s := range status.List { + _, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s\t%s\n", + s.ID, s.Mode, s.Cluster, s.Kubeconfig, s.Namespace, s.Status, s.Netif) + } + _ = w.Flush() + return sb.String(), nil + } +} + +func GetClusterIDByConfig(cmd *cobra.Command, config Config) (string, error) { + flags := flag.NewFlagSet("", flag.ContinueOnError) + var sshConf = &util.SshConfig{} + addSshFlags(flags, sshConf) + configFlags := genericclioptions.NewConfigFlags(false).WithDeprecatedPasswordFlag() + configFlags.AddFlags(flags) + matchVersionFlags := cmdutil.NewMatchVersionFlags(&warp{ConfigFlags: configFlags}) + matchVersionFlags.AddFlags(flags) + factory := cmdutil.NewFactory(matchVersionFlags) + + for _, command := range cmd.Parent().Commands() { + command.Flags().VisitAll(func(f *flag.Flag) { + if flags.Lookup(f.Name) == nil && flags.ShorthandLookup(f.Shorthand) == nil { + flags.AddFlag(f) + } + }) + } + + split := strings.Split(strings.Join(config.Flags, " "), " ") + err := flags.ParseAll(split[:], func(flag *flag.Flag, value string) error { + _ = flags.Set(flag.Name, value) + return nil + }) + bytes, ns, err := util.ConvertToKubeConfigBytes(factory) + if err != nil { + return "", err + } + file, err := util.ConvertToTempKubeconfigFile(bytes) + if err != nil { + return "", err + } + flags = flag.NewFlagSet("", flag.ContinueOnError) + flags.AddFlag(&flag.Flag{ + Name: "kubeconfig", + DefValue: file, + }) + flags.AddFlag(&flag.Flag{ + Name: "namespace", + DefValue: ns, + }) + var path string + path, err = util.SshJump(cmd.Context(), sshConf, flags, false) + if err != nil { + return "", err + } + var c = &handler.ConnectOptions{} + err = c.InitClient(util.InitFactoryByPath(path, ns)) + if err != nil { + return "", err + } + err = c.InitDHCP(cmd.Context()) + if err != nil { + return "", err + } + return c.GetClusterID(), nil +} diff --git a/cmd/kubevpn/cmds/status_test.go b/cmd/kubevpn/cmds/status_test.go new file mode 100644 index 00000000..9df8f5d9 --- /dev/null +++ b/cmd/kubevpn/cmds/status_test.go @@ -0,0 +1,31 @@ +package cmds + +import ( + "testing" + + log "github.com/sirupsen/logrus" +) + +func TestParseFlags(t *testing.T) { + str := ` +Name: test +Needs: test1 +Flags: + - --kubeconfig ~/.kube/vke + - --namespace test + - --ssh-username admin + - --ssh-addr 127.0.0.1:22 + +---` + config, err := ParseConfig([]byte(str)) + if err != nil { + log.Fatal(err) + } + + sshConf, bytes, ns, err := GetClusterIDByConfig(config) + if err != nil { + log.Fatal(err) + } + t.Log(ns, string(bytes)) + t.Log(sshConf.Addr, sshConf.User) +} diff --git a/pkg/daemon/action/disconnect.go b/pkg/daemon/action/disconnect.go index c925fd73..d23f1456 100644 --- a/pkg/daemon/action/disconnect.go +++ b/pkg/daemon/action/disconnect.go @@ -8,6 +8,7 @@ import ( log "github.com/sirupsen/logrus" "github.com/spf13/pflag" + "k8s.io/apimachinery/pkg/util/sets" "github.com/wencaiwulue/kubevpn/v2/pkg/daemon/rpc" "github.com/wencaiwulue/kubevpn/v2/pkg/dns" @@ -69,6 +70,34 @@ func (svr *Server) Disconnect(req *rpc.DisconnectRequest, resp rpc.Daemon_Discon if err != nil { return err } + case len(req.ClusterIDs) != 0: + s := sets.New(req.ClusterIDs...) + var connects = *new(handler.Connects) + var foundModeFull bool + if s.Has(svr.connect.GetClusterID()) { + connects = connects.Append(svr.connect) + foundModeFull = true + } + for i := 0; i < len(svr.secondaryConnect); i++ { + if s.Has(svr.secondaryConnect[i].GetClusterID()) { + connects = connects.Append(svr.secondaryConnect[i]) + svr.secondaryConnect = append(svr.secondaryConnect[:i], svr.secondaryConnect[i+1:]...) + i-- + } + } + for _, connect := range connects.Sort() { + if connect != nil { + connect.Cleanup() + } + } + if foundModeFull { + svr.connect = nil + svr.t = time.Time{} + if svr.clone != nil { + _ = svr.clone.Cleanup() + } + svr.clone = nil + } } if svr.connect == nil && len(svr.secondaryConnect) == 0 { diff --git a/pkg/daemon/action/status.go b/pkg/daemon/action/status.go index 2b9809b6..b041871f 100644 --- a/pkg/daemon/action/status.go +++ b/pkg/daemon/action/status.go @@ -1,47 +1,62 @@ package action import ( - "bytes" "context" - "fmt" - "text/tabwriter" "github.com/wencaiwulue/kubevpn/v2/pkg/daemon/rpc" + "github.com/wencaiwulue/kubevpn/v2/pkg/handler" "github.com/wencaiwulue/kubevpn/v2/pkg/util" ) const ( StatusOk = "Connected" StatusFailed = "Disconnected" + + ModeFull = "full" + ModeLite = "lite" ) -func (svr *Server) Status(ctx context.Context, request *rpc.StatusRequest) (*rpc.StatusResponse, error) { - var sb = new(bytes.Buffer) - w := tabwriter.NewWriter(sb, 1, 1, 1, ' ', 0) - _, _ = fmt.Fprintf(w, "%s\t%s\t%s\t%s\t%s\t%s\t%s\n", "ID", "Mode", "Cluster", "Kubeconfig", "Namespace", "Status", "Netif") - if svr.connect != nil { - cluster := util.GetKubeconfigCluster(svr.connect.GetFactory()) - namespace := svr.connect.Namespace - kubeconfig := svr.connect.OriginKubeconfigPath - name, _ := svr.connect.GetTunDeviceName() - status := StatusOk - if name == "" { - status = StatusFailed - } - _, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s\t%s\n", - 0, "full", cluster, kubeconfig, namespace, status, name) - } +func (svr *Server) Status(ctx context.Context, req *rpc.StatusRequest) (*rpc.StatusResponse, error) { + var list []*rpc.Status - for i, options := range svr.secondaryConnect { - cluster := util.GetKubeconfigCluster(options.GetFactory()) - name, _ := options.GetTunDeviceName() - status := StatusOk - if name == "" { - status = StatusFailed + if len(req.ClusterIDs) != 0 { + for _, clusterID := range req.ClusterIDs { + if svr.connect.GetClusterID() == clusterID { + list = append(list, genStatus(svr.connect, ModeFull, 0)) + } + for i, options := range svr.secondaryConnect { + if options.GetClusterID() == clusterID { + list = append(list, genStatus(options, ModeLite, int32(i+1))) + } + } + } + } else { + if svr.connect != nil { + list = append(list, genStatus(svr.connect, ModeFull, 0)) + } + + for i, options := range svr.secondaryConnect { + list = append(list, genStatus(options, ModeLite, int32(i+1))) } - _, _ = fmt.Fprintf(w, "%d\t%s\t%s\t%s\t%s\t%s\t%s\n", - i+1, "lite", cluster, options.OriginKubeconfigPath, options.Namespace, status, name) } - _ = w.Flush() - return &rpc.StatusResponse{Message: sb.String()}, nil + return &rpc.StatusResponse{List: list}, nil +} + +func genStatus(connect *handler.ConnectOptions, mode string, index int32) *rpc.Status { + status := StatusOk + tunName, _ := connect.GetTunDeviceName() + if tunName == "" { + status = StatusFailed + } + info := rpc.Status{ + ID: index, + ClusterID: connect.GetClusterID(), + Cluster: util.GetKubeconfigCluster(connect.GetFactory()), + Mode: mode, + Kubeconfig: connect.OriginKubeconfigPath, + Namespace: connect.Namespace, + Status: status, + Netif: tunName, + } + return &info } diff --git a/pkg/daemon/rpc/daemon.pb.go b/pkg/daemon/rpc/daemon.pb.go index b2437617..6cf110a4 100644 --- a/pkg/daemon/rpc/daemon.pb.go +++ b/pkg/daemon/rpc/daemon.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.33.0 // protoc v3.21.2 // source: daemon.proto @@ -227,7 +227,9 @@ type DisconnectRequest struct { // 3) disconnect by kubeConfig KubeconfigBytes *string `protobuf:"bytes,3,opt,name=KubeconfigBytes,proto3,oneof" json:"KubeconfigBytes,omitempty"` Namespace *string `protobuf:"bytes,4,opt,name=Namespace,proto3,oneof" json:"Namespace,omitempty"` - SshJump *SshJump `protobuf:"bytes,10,opt,name=SshJump,proto3" json:"SshJump,omitempty"` + SshJump *SshJump `protobuf:"bytes,5,opt,name=SshJump,proto3" json:"SshJump,omitempty"` + // 4) disconnect by cluster ids + ClusterIDs []string `protobuf:"bytes,6,rep,name=ClusterIDs,proto3" json:"ClusterIDs,omitempty"` } func (x *DisconnectRequest) Reset() { @@ -297,6 +299,13 @@ func (x *DisconnectRequest) GetSshJump() *SshJump { return nil } +func (x *DisconnectRequest) GetClusterIDs() []string { + if x != nil { + return x.ClusterIDs + } + return nil +} + type DisconnectResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -849,7 +858,7 @@ type StatusRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + ClusterIDs []string `protobuf:"bytes,1,rep,name=ClusterIDs,proto3" json:"ClusterIDs,omitempty"` } func (x *StatusRequest) Reset() { @@ -884,11 +893,11 @@ func (*StatusRequest) Descriptor() ([]byte, []int) { return file_daemon_proto_rawDescGZIP(), []int{12} } -func (x *StatusRequest) GetName() string { +func (x *StatusRequest) GetClusterIDs() []string { if x != nil { - return x.Name + return x.ClusterIDs } - return "" + return nil } type StatusResponse struct { @@ -896,7 +905,7 @@ type StatusResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + List []*Status `protobuf:"bytes,1,rep,name=List,proto3" json:"List,omitempty"` } func (x *StatusResponse) Reset() { @@ -931,9 +940,112 @@ func (*StatusResponse) Descriptor() ([]byte, []int) { return file_daemon_proto_rawDescGZIP(), []int{13} } -func (x *StatusResponse) GetMessage() string { +func (x *StatusResponse) GetList() []*Status { if x != nil { - return x.Message + return x.List + } + return nil +} + +type Status struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ID int32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` + ClusterID string `protobuf:"bytes,2,opt,name=ClusterID,proto3" json:"ClusterID,omitempty"` + Cluster string `protobuf:"bytes,3,opt,name=Cluster,proto3" json:"Cluster,omitempty"` + Mode string `protobuf:"bytes,4,opt,name=Mode,proto3" json:"Mode,omitempty"` + Kubeconfig string `protobuf:"bytes,5,opt,name=Kubeconfig,proto3" json:"Kubeconfig,omitempty"` + Namespace string `protobuf:"bytes,6,opt,name=Namespace,proto3" json:"Namespace,omitempty"` + Status string `protobuf:"bytes,7,opt,name=Status,proto3" json:"Status,omitempty"` + Netif string `protobuf:"bytes,8,opt,name=Netif,proto3" json:"Netif,omitempty"` +} + +func (x *Status) Reset() { + *x = Status{} + if protoimpl.UnsafeEnabled { + mi := &file_daemon_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Status) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Status) ProtoMessage() {} + +func (x *Status) ProtoReflect() protoreflect.Message { + mi := &file_daemon_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Status.ProtoReflect.Descriptor instead. +func (*Status) Descriptor() ([]byte, []int) { + return file_daemon_proto_rawDescGZIP(), []int{14} +} + +func (x *Status) GetID() int32 { + if x != nil { + return x.ID + } + return 0 +} + +func (x *Status) GetClusterID() string { + if x != nil { + return x.ClusterID + } + return "" +} + +func (x *Status) GetCluster() string { + if x != nil { + return x.Cluster + } + return "" +} + +func (x *Status) GetMode() string { + if x != nil { + return x.Mode + } + return "" +} + +func (x *Status) GetKubeconfig() string { + if x != nil { + return x.Kubeconfig + } + return "" +} + +func (x *Status) GetNamespace() string { + if x != nil { + return x.Namespace + } + return "" +} + +func (x *Status) GetStatus() string { + if x != nil { + return x.Status + } + return "" +} + +func (x *Status) GetNetif() string { + if x != nil { + return x.Netif } return "" } @@ -947,7 +1059,7 @@ type VersionRequest struct { func (x *VersionRequest) Reset() { *x = VersionRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[14] + mi := &file_daemon_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -960,7 +1072,7 @@ func (x *VersionRequest) String() string { func (*VersionRequest) ProtoMessage() {} func (x *VersionRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[14] + mi := &file_daemon_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -973,7 +1085,7 @@ func (x *VersionRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionRequest.ProtoReflect.Descriptor instead. func (*VersionRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{14} + return file_daemon_proto_rawDescGZIP(), []int{15} } type VersionResponse struct { @@ -987,7 +1099,7 @@ type VersionResponse struct { func (x *VersionResponse) Reset() { *x = VersionResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[15] + mi := &file_daemon_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1000,7 +1112,7 @@ func (x *VersionResponse) String() string { func (*VersionResponse) ProtoMessage() {} func (x *VersionResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[15] + mi := &file_daemon_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1013,7 +1125,7 @@ func (x *VersionResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use VersionResponse.ProtoReflect.Descriptor instead. func (*VersionResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{15} + return file_daemon_proto_rawDescGZIP(), []int{16} } func (x *VersionResponse) GetVersion() string { @@ -1037,7 +1149,7 @@ type ConfigAddRequest struct { func (x *ConfigAddRequest) Reset() { *x = ConfigAddRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[16] + mi := &file_daemon_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1050,7 +1162,7 @@ func (x *ConfigAddRequest) String() string { func (*ConfigAddRequest) ProtoMessage() {} func (x *ConfigAddRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[16] + mi := &file_daemon_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1063,7 +1175,7 @@ func (x *ConfigAddRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigAddRequest.ProtoReflect.Descriptor instead. func (*ConfigAddRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{16} + return file_daemon_proto_rawDescGZIP(), []int{17} } func (x *ConfigAddRequest) GetKubeconfigBytes() string { @@ -1098,7 +1210,7 @@ type SshStartRequest struct { func (x *SshStartRequest) Reset() { *x = SshStartRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[17] + mi := &file_daemon_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1111,7 +1223,7 @@ func (x *SshStartRequest) String() string { func (*SshStartRequest) ProtoMessage() {} func (x *SshStartRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[17] + mi := &file_daemon_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1124,7 +1236,7 @@ func (x *SshStartRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SshStartRequest.ProtoReflect.Descriptor instead. func (*SshStartRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{17} + return file_daemon_proto_rawDescGZIP(), []int{18} } func (x *SshStartRequest) GetClientIP() string { @@ -1145,7 +1257,7 @@ type SshStartResponse struct { func (x *SshStartResponse) Reset() { *x = SshStartResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[18] + mi := &file_daemon_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1158,7 +1270,7 @@ func (x *SshStartResponse) String() string { func (*SshStartResponse) ProtoMessage() {} func (x *SshStartResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[18] + mi := &file_daemon_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1171,7 +1283,7 @@ func (x *SshStartResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SshStartResponse.ProtoReflect.Descriptor instead. func (*SshStartResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{18} + return file_daemon_proto_rawDescGZIP(), []int{19} } func (x *SshStartResponse) GetServerIP() string { @@ -1192,7 +1304,7 @@ type SshStopRequest struct { func (x *SshStopRequest) Reset() { *x = SshStopRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[19] + mi := &file_daemon_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1205,7 +1317,7 @@ func (x *SshStopRequest) String() string { func (*SshStopRequest) ProtoMessage() {} func (x *SshStopRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[19] + mi := &file_daemon_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1218,7 +1330,7 @@ func (x *SshStopRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SshStopRequest.ProtoReflect.Descriptor instead. func (*SshStopRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{19} + return file_daemon_proto_rawDescGZIP(), []int{20} } func (x *SshStopRequest) GetClientIP() string { @@ -1239,7 +1351,7 @@ type SshStopResponse struct { func (x *SshStopResponse) Reset() { *x = SshStopResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[20] + mi := &file_daemon_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1252,7 +1364,7 @@ func (x *SshStopResponse) String() string { func (*SshStopResponse) ProtoMessage() {} func (x *SshStopResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[20] + mi := &file_daemon_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1265,7 +1377,7 @@ func (x *SshStopResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SshStopResponse.ProtoReflect.Descriptor instead. func (*SshStopResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{20} + return file_daemon_proto_rawDescGZIP(), []int{21} } func (x *SshStopResponse) GetServerIP() string { @@ -1287,7 +1399,7 @@ type SshConnectRequest struct { func (x *SshConnectRequest) Reset() { *x = SshConnectRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[21] + mi := &file_daemon_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1300,7 +1412,7 @@ func (x *SshConnectRequest) String() string { func (*SshConnectRequest) ProtoMessage() {} func (x *SshConnectRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[21] + mi := &file_daemon_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1313,7 +1425,7 @@ func (x *SshConnectRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use SshConnectRequest.ProtoReflect.Descriptor instead. func (*SshConnectRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{21} + return file_daemon_proto_rawDescGZIP(), []int{22} } func (x *SshConnectRequest) GetStdin() string { @@ -1342,7 +1454,7 @@ type SshConnectResponse struct { func (x *SshConnectResponse) Reset() { *x = SshConnectResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[22] + mi := &file_daemon_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1355,7 +1467,7 @@ func (x *SshConnectResponse) String() string { func (*SshConnectResponse) ProtoMessage() {} func (x *SshConnectResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[22] + mi := &file_daemon_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1368,7 +1480,7 @@ func (x *SshConnectResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use SshConnectResponse.ProtoReflect.Descriptor instead. func (*SshConnectResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{22} + return file_daemon_proto_rawDescGZIP(), []int{23} } func (x *SshConnectResponse) GetStdout() string { @@ -1396,7 +1508,7 @@ type ConfigAddResponse struct { func (x *ConfigAddResponse) Reset() { *x = ConfigAddResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[23] + mi := &file_daemon_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1409,7 +1521,7 @@ func (x *ConfigAddResponse) String() string { func (*ConfigAddResponse) ProtoMessage() {} func (x *ConfigAddResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[23] + mi := &file_daemon_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1422,7 +1534,7 @@ func (x *ConfigAddResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigAddResponse.ProtoReflect.Descriptor instead. func (*ConfigAddResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{23} + return file_daemon_proto_rawDescGZIP(), []int{24} } func (x *ConfigAddResponse) GetClusterID() string { @@ -1443,7 +1555,7 @@ type ConfigRemoveRequest struct { func (x *ConfigRemoveRequest) Reset() { *x = ConfigRemoveRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[24] + mi := &file_daemon_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1456,7 +1568,7 @@ func (x *ConfigRemoveRequest) String() string { func (*ConfigRemoveRequest) ProtoMessage() {} func (x *ConfigRemoveRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[24] + mi := &file_daemon_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1469,7 +1581,7 @@ func (x *ConfigRemoveRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigRemoveRequest.ProtoReflect.Descriptor instead. func (*ConfigRemoveRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{24} + return file_daemon_proto_rawDescGZIP(), []int{25} } func (x *ConfigRemoveRequest) GetClusterID() string { @@ -1488,7 +1600,7 @@ type ConfigRemoveResponse struct { func (x *ConfigRemoveResponse) Reset() { *x = ConfigRemoveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[25] + mi := &file_daemon_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1501,7 +1613,7 @@ func (x *ConfigRemoveResponse) String() string { func (*ConfigRemoveResponse) ProtoMessage() {} func (x *ConfigRemoveResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[25] + mi := &file_daemon_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1514,7 +1626,7 @@ func (x *ConfigRemoveResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ConfigRemoveResponse.ProtoReflect.Descriptor instead. func (*ConfigRemoveResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{25} + return file_daemon_proto_rawDescGZIP(), []int{26} } type LogRequest struct { @@ -1528,7 +1640,7 @@ type LogRequest struct { func (x *LogRequest) Reset() { *x = LogRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[26] + mi := &file_daemon_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1541,7 +1653,7 @@ func (x *LogRequest) String() string { func (*LogRequest) ProtoMessage() {} func (x *LogRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[26] + mi := &file_daemon_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1554,7 +1666,7 @@ func (x *LogRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use LogRequest.ProtoReflect.Descriptor instead. func (*LogRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{26} + return file_daemon_proto_rawDescGZIP(), []int{27} } func (x *LogRequest) GetFollow() bool { @@ -1575,7 +1687,7 @@ type LogResponse struct { func (x *LogResponse) Reset() { *x = LogResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[27] + mi := &file_daemon_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1588,7 +1700,7 @@ func (x *LogResponse) String() string { func (*LogResponse) ProtoMessage() {} func (x *LogResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[27] + mi := &file_daemon_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1601,7 +1713,7 @@ func (x *LogResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use LogResponse.ProtoReflect.Descriptor instead. func (*LogResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{27} + return file_daemon_proto_rawDescGZIP(), []int{28} } func (x *LogResponse) GetMessage() string { @@ -1620,7 +1732,7 @@ type ListRequest struct { func (x *ListRequest) Reset() { *x = ListRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[28] + mi := &file_daemon_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1633,7 +1745,7 @@ func (x *ListRequest) String() string { func (*ListRequest) ProtoMessage() {} func (x *ListRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[28] + mi := &file_daemon_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1646,7 +1758,7 @@ func (x *ListRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ListRequest.ProtoReflect.Descriptor instead. func (*ListRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{28} + return file_daemon_proto_rawDescGZIP(), []int{29} } type ListResponse struct { @@ -1660,7 +1772,7 @@ type ListResponse struct { func (x *ListResponse) Reset() { *x = ListResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[29] + mi := &file_daemon_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1673,7 +1785,7 @@ func (x *ListResponse) String() string { func (*ListResponse) ProtoMessage() {} func (x *ListResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[29] + mi := &file_daemon_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1686,7 +1798,7 @@ func (x *ListResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ListResponse.ProtoReflect.Descriptor instead. func (*ListResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{29} + return file_daemon_proto_rawDescGZIP(), []int{30} } func (x *ListResponse) GetMessage() string { @@ -1708,7 +1820,7 @@ type GetRequest struct { func (x *GetRequest) Reset() { *x = GetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[30] + mi := &file_daemon_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1721,7 +1833,7 @@ func (x *GetRequest) String() string { func (*GetRequest) ProtoMessage() {} func (x *GetRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[30] + mi := &file_daemon_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1734,7 +1846,7 @@ func (x *GetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use GetRequest.ProtoReflect.Descriptor instead. func (*GetRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{30} + return file_daemon_proto_rawDescGZIP(), []int{31} } func (x *GetRequest) GetNamespace() string { @@ -1762,7 +1874,7 @@ type GetResponse struct { func (x *GetResponse) Reset() { *x = GetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[31] + mi := &file_daemon_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1775,7 +1887,7 @@ func (x *GetResponse) String() string { func (*GetResponse) ProtoMessage() {} func (x *GetResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[31] + mi := &file_daemon_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1788,7 +1900,7 @@ func (x *GetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use GetResponse.ProtoReflect.Descriptor instead. func (*GetResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{31} + return file_daemon_proto_rawDescGZIP(), []int{32} } func (x *GetResponse) GetMetadata() []*Metadata { @@ -1810,7 +1922,7 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[32] + mi := &file_daemon_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1823,7 +1935,7 @@ func (x *Metadata) String() string { func (*Metadata) ProtoMessage() {} func (x *Metadata) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[32] + mi := &file_daemon_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1836,7 +1948,7 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { // Deprecated: Use Metadata.ProtoReflect.Descriptor instead. func (*Metadata) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{32} + return file_daemon_proto_rawDescGZIP(), []int{33} } func (x *Metadata) GetName() string { @@ -1865,7 +1977,7 @@ type UpgradeRequest struct { func (x *UpgradeRequest) Reset() { *x = UpgradeRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[33] + mi := &file_daemon_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1878,7 +1990,7 @@ func (x *UpgradeRequest) String() string { func (*UpgradeRequest) ProtoMessage() {} func (x *UpgradeRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[33] + mi := &file_daemon_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1891,7 +2003,7 @@ func (x *UpgradeRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use UpgradeRequest.ProtoReflect.Descriptor instead. func (*UpgradeRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{33} + return file_daemon_proto_rawDescGZIP(), []int{34} } func (x *UpgradeRequest) GetClientVersion() string { @@ -1919,7 +2031,7 @@ type UpgradeResponse struct { func (x *UpgradeResponse) Reset() { *x = UpgradeResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[34] + mi := &file_daemon_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1932,7 +2044,7 @@ func (x *UpgradeResponse) String() string { func (*UpgradeResponse) ProtoMessage() {} func (x *UpgradeResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[34] + mi := &file_daemon_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1945,7 +2057,7 @@ func (x *UpgradeResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use UpgradeResponse.ProtoReflect.Descriptor instead. func (*UpgradeResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{34} + return file_daemon_proto_rawDescGZIP(), []int{35} } func (x *UpgradeResponse) GetNeedUpgrade() bool { @@ -1969,7 +2081,7 @@ type ResetRequest struct { func (x *ResetRequest) Reset() { *x = ResetRequest{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[35] + mi := &file_daemon_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1982,7 +2094,7 @@ func (x *ResetRequest) String() string { func (*ResetRequest) ProtoMessage() {} func (x *ResetRequest) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[35] + mi := &file_daemon_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1995,7 +2107,7 @@ func (x *ResetRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetRequest.ProtoReflect.Descriptor instead. func (*ResetRequest) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{35} + return file_daemon_proto_rawDescGZIP(), []int{36} } func (x *ResetRequest) GetKubeconfigBytes() string { @@ -2030,7 +2142,7 @@ type ResetResponse struct { func (x *ResetResponse) Reset() { *x = ResetResponse{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[36] + mi := &file_daemon_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2043,7 +2155,7 @@ func (x *ResetResponse) String() string { func (*ResetResponse) ProtoMessage() {} func (x *ResetResponse) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[36] + mi := &file_daemon_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2056,7 +2168,7 @@ func (x *ResetResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ResetResponse.ProtoReflect.Descriptor instead. func (*ResetResponse) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{36} + return file_daemon_proto_rawDescGZIP(), []int{37} } func (x *ResetResponse) GetMessage() string { @@ -2085,7 +2197,7 @@ type SshJump struct { func (x *SshJump) Reset() { *x = SshJump{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[37] + mi := &file_daemon_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2098,7 +2210,7 @@ func (x *SshJump) String() string { func (*SshJump) ProtoMessage() {} func (x *SshJump) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[37] + mi := &file_daemon_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2111,7 +2223,7 @@ func (x *SshJump) ProtoReflect() protoreflect.Message { // Deprecated: Use SshJump.ProtoReflect.Descriptor instead. func (*SshJump) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{37} + return file_daemon_proto_rawDescGZIP(), []int{38} } func (x *SshJump) GetAddr() string { @@ -2190,7 +2302,7 @@ type ExtraRoute struct { func (x *ExtraRoute) Reset() { *x = ExtraRoute{} if protoimpl.UnsafeEnabled { - mi := &file_daemon_proto_msgTypes[38] + mi := &file_daemon_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2203,7 +2315,7 @@ func (x *ExtraRoute) String() string { func (*ExtraRoute) ProtoMessage() {} func (x *ExtraRoute) ProtoReflect() protoreflect.Message { - mi := &file_daemon_proto_msgTypes[38] + mi := &file_daemon_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2216,7 +2328,7 @@ func (x *ExtraRoute) ProtoReflect() protoreflect.Message { // Deprecated: Use ExtraRoute.ProtoReflect.Descriptor instead. func (*ExtraRoute) Descriptor() ([]byte, []int) { - return file_daemon_proto_rawDescGZIP(), []int{38} + return file_daemon_proto_rawDescGZIP(), []int{39} } func (x *ExtraRoute) GetExtraCIDR() []string { @@ -2281,7 +2393,7 @@ var file_daemon_proto_rawDesc = []byte{ 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2b, 0x0a, 0x0f, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x22, 0xea, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x67, 0x65, 0x22, 0x8a, 0x02, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x13, 0x0a, 0x02, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x02, 0x49, 0x44, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x41, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x01, 0x52, 0x03, 0x41, 0x6c, @@ -2291,8 +2403,10 @@ var file_daemon_proto_rawDesc = []byte{ 0x88, 0x01, 0x01, 0x12, 0x21, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x03, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x88, 0x01, 0x01, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, - 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, - 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x42, 0x05, + 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, + 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x12, 0x1e, + 0x0a, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x06, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x73, 0x42, 0x05, 0x0a, 0x03, 0x5f, 0x49, 0x44, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x41, 0x6c, 0x6c, 0x42, 0x12, 0x0a, 0x10, 0x5f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, @@ -2362,193 +2476,207 @@ var file_daemon_proto_rawDesc = []byte{ 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x23, 0x0a, - 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x2a, 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x10, - 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, - 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, - 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, - 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, - 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, - 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, - 0x6d, 0x70, 0x22, 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, - 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, - 0x50, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, - 0x50, 0x22, 0x2c, 0x0a, 0x0e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x22, - 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50, 0x22, 0x51, - 0x0a, 0x11, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, - 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, - 0x70, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75, - 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, - 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x33, 0x0a, 0x13, 0x43, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, - 0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x46, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x22, 0x27, 0x0a, - 0x0b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0x46, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, - 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, - 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x38, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x6d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x22, 0x3c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, - 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, - 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, - 0x5e, 0x0a, 0x0e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, - 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, - 0x33, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x65, 0x65, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x4e, 0x65, 0x65, 0x64, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x22, 0x7e, 0x0a, 0x0c, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, - 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x26, 0x0a, 0x07, - 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, - 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, - 0xb3, 0x02, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x41, - 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x41, 0x64, 0x64, 0x72, 0x12, - 0x12, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, - 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x52, - 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62, - 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, 0x10, 0x47, 0x53, 0x53, 0x41, 0x50, - 0x49, 0x4b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x10, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x43, - 0x6f, 0x6e, 0x66, 0x12, 0x26, 0x0a, 0x0e, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x47, 0x53, 0x53, - 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x47, - 0x53, 0x53, 0x41, 0x50, 0x49, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x18, 0x09, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x43, 0x61, 0x63, 0x68, - 0x65, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x6e, 0x0a, 0x0a, 0x45, 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, - 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x45, 0x78, 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, - 0x52, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x44, 0x6f, 0x6d, - 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, - 0x49, 0x50, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, 0x4e, - 0x6f, 0x64, 0x65, 0x49, 0x50, 0x32, 0xeb, 0x08, 0x0a, 0x06, 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, - 0x12, 0x38, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x13, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x0b, 0x43, 0x6f, - 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x6f, 0x72, 0x6b, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x36, 0x0a, 0x05, 0x50, - 0x72, 0x6f, 0x78, 0x79, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2f, 0x0a, + 0x0d, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1e, + 0x0a, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x0a, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x73, 0x22, 0x31, + 0x0a, 0x0e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x1f, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0b, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x04, 0x4c, 0x69, 0x73, + 0x74, 0x22, 0xd0, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0e, 0x0a, 0x02, + 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x02, 0x49, 0x44, 0x12, 0x1c, 0x0a, 0x09, + 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x12, 0x18, 0x0a, 0x07, 0x43, 0x6c, + 0x75, 0x73, 0x74, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x43, 0x6c, 0x75, + 0x73, 0x74, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x4d, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, + 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x4e, 0x65, 0x74, 0x69, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x4e, + 0x65, 0x74, 0x69, 0x66, 0x22, 0x10, 0x0a, 0x0e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, 0x62, 0x65, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, + 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, + 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, + 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x49, 0x50, 0x22, 0x2e, 0x0a, 0x10, 0x53, 0x73, 0x68, 0x53, 0x74, + 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x49, 0x50, 0x22, 0x2c, 0x0a, 0x0e, 0x53, 0x73, 0x68, 0x53, 0x74, + 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x49, 0x50, 0x22, 0x2d, 0x0a, 0x0f, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x50, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x49, 0x50, 0x22, 0x51, 0x0a, 0x11, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x53, 0x74, 0x64, + 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x53, 0x74, 0x64, 0x69, 0x6e, 0x12, + 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, + 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x44, 0x0a, 0x12, 0x53, 0x73, 0x68, 0x43, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, + 0x06, 0x53, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, + 0x74, 0x64, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x53, 0x74, 0x64, 0x65, 0x72, 0x72, 0x22, 0x31, 0x0a, + 0x11, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x49, 0x44, + 0x22, 0x33, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x43, 0x6c, 0x75, 0x73, 0x74, + 0x65, 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x43, 0x6c, 0x75, 0x73, + 0x74, 0x65, 0x72, 0x49, 0x44, 0x22, 0x16, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, + 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x0a, + 0x0a, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x46, + 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x46, 0x6f, 0x6c, + 0x6c, 0x6f, 0x77, 0x22, 0x27, 0x0a, 0x0b, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0d, 0x0a, 0x0b, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x28, 0x0a, 0x0c, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x46, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x38, 0x0a, + 0x0b, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x22, 0x3c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, + 0x70, 0x61, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x22, 0x5e, 0x0a, 0x0e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x26, 0x0a, + 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x49, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6d, + 0x6d, 0x69, 0x74, 0x49, 0x64, 0x22, 0x33, 0x0a, 0x0f, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x4e, 0x65, 0x65, 0x64, + 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x4e, + 0x65, 0x65, 0x64, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x22, 0x7e, 0x0a, 0x0c, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x28, 0x0a, 0x0f, 0x4b, 0x75, + 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0f, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, + 0x79, 0x74, 0x65, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, + 0x63, 0x65, 0x12, 0x26, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, + 0x70, 0x52, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, 0x70, 0x22, 0x29, 0x0a, 0x0d, 0x52, 0x65, + 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, + 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xb3, 0x02, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x4a, 0x75, 0x6d, + 0x70, 0x12, 0x12, 0x0a, 0x04, 0x41, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x41, 0x64, 0x64, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x50, 0x61, 0x73, + 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x4b, 0x65, 0x79, 0x66, 0x69, 0x6c, 0x65, 0x12, + 0x20, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x6c, 0x69, 0x61, + 0x73, 0x12, 0x2a, 0x0a, 0x10, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x52, 0x65, 0x6d, + 0x6f, 0x74, 0x65, 0x4b, 0x75, 0x62, 0x65, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x2a, 0x0a, + 0x10, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x4b, 0x65, 0x79, 0x74, 0x61, 0x62, 0x43, 0x6f, 0x6e, + 0x66, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x4b, + 0x65, 0x79, 0x74, 0x61, 0x62, 0x43, 0x6f, 0x6e, 0x66, 0x12, 0x26, 0x0a, 0x0e, 0x47, 0x53, 0x53, + 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0e, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, + 0x64, 0x12, 0x28, 0x0a, 0x0f, 0x47, 0x53, 0x53, 0x41, 0x50, 0x49, 0x43, 0x61, 0x63, 0x68, 0x65, + 0x46, 0x69, 0x6c, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x47, 0x53, 0x53, 0x41, + 0x50, 0x49, 0x43, 0x61, 0x63, 0x68, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x22, 0x6e, 0x0a, 0x0a, 0x45, + 0x78, 0x74, 0x72, 0x61, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x43, 0x49, 0x44, 0x52, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x74, 0x72, 0x61, + 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x45, 0x78, + 0x74, 0x72, 0x61, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x45, 0x78, 0x74, + 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, + 0x45, 0x78, 0x74, 0x72, 0x61, 0x4e, 0x6f, 0x64, 0x65, 0x49, 0x50, 0x32, 0xeb, 0x08, 0x0a, 0x06, + 0x44, 0x61, 0x65, 0x6d, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, + 0x12, 0x3c, 0x0a, 0x0b, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x46, 0x6f, 0x72, 0x6b, 0x12, + 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x41, + 0x0a, 0x0a, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x4c, 0x65, 0x61, + 0x76, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x76, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, + 0x05, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, + 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x35, 0x0a, 0x06, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x12, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x41, 0x64, 0x64, 0x12, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, + 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, + 0x08, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x53, + 0x74, 0x6f, 0x70, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, + 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x12, 0x11, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x65, 0x61, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x32, 0x0a, 0x05, 0x43, 0x6c, 0x6f, 0x6e, 0x65, - 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x6f, 0x6e, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x35, 0x0a, 0x06, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x6d, 0x6f, - 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x3c, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x12, - 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, - 0x66, 0x69, 0x67, 0x41, 0x64, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x45, 0x0a, 0x0c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x12, 0x18, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, - 0x6f, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x73, 0x68, 0x53, 0x74, - 0x61, 0x72, 0x74, 0x12, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, - 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x73, 0x68, 0x53, 0x74, 0x61, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x12, 0x13, 0x2e, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x53, 0x74, 0x6f, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x43, 0x0a, 0x0a, 0x53, 0x73, - 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x12, 0x16, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x73, 0x68, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, - 0x2d, 0x0a, 0x04, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, - 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2d, - 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, - 0x03, 0x47, 0x65, 0x74, 0x12, 0x0f, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x55, 0x70, 0x67, - 0x72, 0x61, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, - 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, - 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x2e, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, - 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, - 0x0a, 0x05, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, - 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x04, 0x51, 0x75, 0x69, 0x74, 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, - 0x2e, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, - 0x70, 0x63, 0x2e, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x00, 0x28, 0x01, 0x30, 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x4c, 0x6f, 0x67, 0x73, 0x12, 0x0f, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x00, 0x30, 0x01, 0x12, 0x2d, 0x0a, 0x04, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x10, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x11, + 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x2a, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x0f, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x10, 0x2e, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, + 0x36, 0x0a, 0x07, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, + 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x14, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x70, 0x67, 0x72, 0x61, 0x64, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x33, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x12, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x07, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x13, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x72, + 0x70, 0x63, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x32, 0x0a, 0x05, 0x52, 0x65, 0x73, 0x65, 0x74, 0x12, 0x11, 0x2e, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x12, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x12, 0x2f, 0x0a, 0x04, 0x51, 0x75, 0x69, 0x74, + 0x12, 0x10, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x11, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x69, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x07, 0x5a, 0x05, 0x2e, 0x3b, 0x72, + 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2563,7 +2691,7 @@ func file_daemon_proto_rawDescGZIP() []byte { return file_daemon_proto_rawDescData } -var file_daemon_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_daemon_proto_msgTypes = make([]protoimpl.MessageInfo, 42) var file_daemon_proto_goTypes = []interface{}{ (*ConnectRequest)(nil), // 0: rpc.ConnectRequest (*ConnectResponse)(nil), // 1: rpc.ConnectResponse @@ -2579,91 +2707,93 @@ var file_daemon_proto_goTypes = []interface{}{ (*QuitResponse)(nil), // 11: rpc.QuitResponse (*StatusRequest)(nil), // 12: rpc.StatusRequest (*StatusResponse)(nil), // 13: rpc.StatusResponse - (*VersionRequest)(nil), // 14: rpc.VersionRequest - (*VersionResponse)(nil), // 15: rpc.VersionResponse - (*ConfigAddRequest)(nil), // 16: rpc.ConfigAddRequest - (*SshStartRequest)(nil), // 17: rpc.SshStartRequest - (*SshStartResponse)(nil), // 18: rpc.SshStartResponse - (*SshStopRequest)(nil), // 19: rpc.SshStopRequest - (*SshStopResponse)(nil), // 20: rpc.SshStopResponse - (*SshConnectRequest)(nil), // 21: rpc.SshConnectRequest - (*SshConnectResponse)(nil), // 22: rpc.SshConnectResponse - (*ConfigAddResponse)(nil), // 23: rpc.ConfigAddResponse - (*ConfigRemoveRequest)(nil), // 24: rpc.ConfigRemoveRequest - (*ConfigRemoveResponse)(nil), // 25: rpc.ConfigRemoveResponse - (*LogRequest)(nil), // 26: rpc.LogRequest - (*LogResponse)(nil), // 27: rpc.LogResponse - (*ListRequest)(nil), // 28: rpc.ListRequest - (*ListResponse)(nil), // 29: rpc.ListResponse - (*GetRequest)(nil), // 30: rpc.GetRequest - (*GetResponse)(nil), // 31: rpc.GetResponse - (*Metadata)(nil), // 32: rpc.metadata - (*UpgradeRequest)(nil), // 33: rpc.UpgradeRequest - (*UpgradeResponse)(nil), // 34: rpc.UpgradeResponse - (*ResetRequest)(nil), // 35: rpc.ResetRequest - (*ResetResponse)(nil), // 36: rpc.ResetResponse - (*SshJump)(nil), // 37: rpc.SshJump - (*ExtraRoute)(nil), // 38: rpc.ExtraRoute - nil, // 39: rpc.ConnectRequest.HeadersEntry - nil, // 40: rpc.CloneRequest.HeadersEntry + (*Status)(nil), // 14: rpc.Status + (*VersionRequest)(nil), // 15: rpc.VersionRequest + (*VersionResponse)(nil), // 16: rpc.VersionResponse + (*ConfigAddRequest)(nil), // 17: rpc.ConfigAddRequest + (*SshStartRequest)(nil), // 18: rpc.SshStartRequest + (*SshStartResponse)(nil), // 19: rpc.SshStartResponse + (*SshStopRequest)(nil), // 20: rpc.SshStopRequest + (*SshStopResponse)(nil), // 21: rpc.SshStopResponse + (*SshConnectRequest)(nil), // 22: rpc.SshConnectRequest + (*SshConnectResponse)(nil), // 23: rpc.SshConnectResponse + (*ConfigAddResponse)(nil), // 24: rpc.ConfigAddResponse + (*ConfigRemoveRequest)(nil), // 25: rpc.ConfigRemoveRequest + (*ConfigRemoveResponse)(nil), // 26: rpc.ConfigRemoveResponse + (*LogRequest)(nil), // 27: rpc.LogRequest + (*LogResponse)(nil), // 28: rpc.LogResponse + (*ListRequest)(nil), // 29: rpc.ListRequest + (*ListResponse)(nil), // 30: rpc.ListResponse + (*GetRequest)(nil), // 31: rpc.GetRequest + (*GetResponse)(nil), // 32: rpc.GetResponse + (*Metadata)(nil), // 33: rpc.metadata + (*UpgradeRequest)(nil), // 34: rpc.UpgradeRequest + (*UpgradeResponse)(nil), // 35: rpc.UpgradeResponse + (*ResetRequest)(nil), // 36: rpc.ResetRequest + (*ResetResponse)(nil), // 37: rpc.ResetResponse + (*SshJump)(nil), // 38: rpc.SshJump + (*ExtraRoute)(nil), // 39: rpc.ExtraRoute + nil, // 40: rpc.ConnectRequest.HeadersEntry + nil, // 41: rpc.CloneRequest.HeadersEntry } var file_daemon_proto_depIdxs = []int32{ - 39, // 0: rpc.ConnectRequest.Headers:type_name -> rpc.ConnectRequest.HeadersEntry - 38, // 1: rpc.ConnectRequest.ExtraRoute:type_name -> rpc.ExtraRoute - 37, // 2: rpc.ConnectRequest.SshJump:type_name -> rpc.SshJump - 37, // 3: rpc.DisconnectRequest.SshJump:type_name -> rpc.SshJump - 40, // 4: rpc.CloneRequest.Headers:type_name -> rpc.CloneRequest.HeadersEntry - 38, // 5: rpc.CloneRequest.ExtraRoute:type_name -> rpc.ExtraRoute - 37, // 6: rpc.CloneRequest.SshJump:type_name -> rpc.SshJump - 37, // 7: rpc.ConfigAddRequest.SshJump:type_name -> rpc.SshJump - 37, // 8: rpc.SshConnectRequest.SshJump:type_name -> rpc.SshJump - 32, // 9: rpc.GetResponse.metadata:type_name -> rpc.metadata - 37, // 10: rpc.ResetRequest.SshJump:type_name -> rpc.SshJump - 0, // 11: rpc.Daemon.Connect:input_type -> rpc.ConnectRequest - 0, // 12: rpc.Daemon.ConnectFork:input_type -> rpc.ConnectRequest - 2, // 13: rpc.Daemon.Disconnect:input_type -> rpc.DisconnectRequest - 0, // 14: rpc.Daemon.Proxy:input_type -> rpc.ConnectRequest - 4, // 15: rpc.Daemon.Leave:input_type -> rpc.LeaveRequest - 6, // 16: rpc.Daemon.Clone:input_type -> rpc.CloneRequest - 8, // 17: rpc.Daemon.Remove:input_type -> rpc.RemoveRequest - 16, // 18: rpc.Daemon.ConfigAdd:input_type -> rpc.ConfigAddRequest - 24, // 19: rpc.Daemon.ConfigRemove:input_type -> rpc.ConfigRemoveRequest - 17, // 20: rpc.Daemon.SshStart:input_type -> rpc.SshStartRequest - 19, // 21: rpc.Daemon.SshStop:input_type -> rpc.SshStopRequest - 21, // 22: rpc.Daemon.SshConnect:input_type -> rpc.SshConnectRequest - 26, // 23: rpc.Daemon.Logs:input_type -> rpc.LogRequest - 28, // 24: rpc.Daemon.List:input_type -> rpc.ListRequest - 30, // 25: rpc.Daemon.Get:input_type -> rpc.GetRequest - 33, // 26: rpc.Daemon.Upgrade:input_type -> rpc.UpgradeRequest - 12, // 27: rpc.Daemon.Status:input_type -> rpc.StatusRequest - 14, // 28: rpc.Daemon.Version:input_type -> rpc.VersionRequest - 35, // 29: rpc.Daemon.Reset:input_type -> rpc.ResetRequest - 10, // 30: rpc.Daemon.Quit:input_type -> rpc.QuitRequest - 1, // 31: rpc.Daemon.Connect:output_type -> rpc.ConnectResponse - 1, // 32: rpc.Daemon.ConnectFork:output_type -> rpc.ConnectResponse - 3, // 33: rpc.Daemon.Disconnect:output_type -> rpc.DisconnectResponse - 1, // 34: rpc.Daemon.Proxy:output_type -> rpc.ConnectResponse - 5, // 35: rpc.Daemon.Leave:output_type -> rpc.LeaveResponse - 7, // 36: rpc.Daemon.Clone:output_type -> rpc.CloneResponse - 9, // 37: rpc.Daemon.Remove:output_type -> rpc.RemoveResponse - 23, // 38: rpc.Daemon.ConfigAdd:output_type -> rpc.ConfigAddResponse - 25, // 39: rpc.Daemon.ConfigRemove:output_type -> rpc.ConfigRemoveResponse - 18, // 40: rpc.Daemon.SshStart:output_type -> rpc.SshStartResponse - 20, // 41: rpc.Daemon.SshStop:output_type -> rpc.SshStopResponse - 22, // 42: rpc.Daemon.SshConnect:output_type -> rpc.SshConnectResponse - 27, // 43: rpc.Daemon.Logs:output_type -> rpc.LogResponse - 29, // 44: rpc.Daemon.List:output_type -> rpc.ListResponse - 31, // 45: rpc.Daemon.Get:output_type -> rpc.GetResponse - 34, // 46: rpc.Daemon.Upgrade:output_type -> rpc.UpgradeResponse - 13, // 47: rpc.Daemon.Status:output_type -> rpc.StatusResponse - 15, // 48: rpc.Daemon.Version:output_type -> rpc.VersionResponse - 36, // 49: rpc.Daemon.Reset:output_type -> rpc.ResetResponse - 11, // 50: rpc.Daemon.Quit:output_type -> rpc.QuitResponse - 31, // [31:51] is the sub-list for method output_type - 11, // [11:31] is the sub-list for method input_type - 11, // [11:11] is the sub-list for extension type_name - 11, // [11:11] is the sub-list for extension extendee - 0, // [0:11] is the sub-list for field type_name + 40, // 0: rpc.ConnectRequest.Headers:type_name -> rpc.ConnectRequest.HeadersEntry + 39, // 1: rpc.ConnectRequest.ExtraRoute:type_name -> rpc.ExtraRoute + 38, // 2: rpc.ConnectRequest.SshJump:type_name -> rpc.SshJump + 38, // 3: rpc.DisconnectRequest.SshJump:type_name -> rpc.SshJump + 41, // 4: rpc.CloneRequest.Headers:type_name -> rpc.CloneRequest.HeadersEntry + 39, // 5: rpc.CloneRequest.ExtraRoute:type_name -> rpc.ExtraRoute + 38, // 6: rpc.CloneRequest.SshJump:type_name -> rpc.SshJump + 14, // 7: rpc.StatusResponse.List:type_name -> rpc.Status + 38, // 8: rpc.ConfigAddRequest.SshJump:type_name -> rpc.SshJump + 38, // 9: rpc.SshConnectRequest.SshJump:type_name -> rpc.SshJump + 33, // 10: rpc.GetResponse.metadata:type_name -> rpc.metadata + 38, // 11: rpc.ResetRequest.SshJump:type_name -> rpc.SshJump + 0, // 12: rpc.Daemon.Connect:input_type -> rpc.ConnectRequest + 0, // 13: rpc.Daemon.ConnectFork:input_type -> rpc.ConnectRequest + 2, // 14: rpc.Daemon.Disconnect:input_type -> rpc.DisconnectRequest + 0, // 15: rpc.Daemon.Proxy:input_type -> rpc.ConnectRequest + 4, // 16: rpc.Daemon.Leave:input_type -> rpc.LeaveRequest + 6, // 17: rpc.Daemon.Clone:input_type -> rpc.CloneRequest + 8, // 18: rpc.Daemon.Remove:input_type -> rpc.RemoveRequest + 17, // 19: rpc.Daemon.ConfigAdd:input_type -> rpc.ConfigAddRequest + 25, // 20: rpc.Daemon.ConfigRemove:input_type -> rpc.ConfigRemoveRequest + 18, // 21: rpc.Daemon.SshStart:input_type -> rpc.SshStartRequest + 20, // 22: rpc.Daemon.SshStop:input_type -> rpc.SshStopRequest + 22, // 23: rpc.Daemon.SshConnect:input_type -> rpc.SshConnectRequest + 27, // 24: rpc.Daemon.Logs:input_type -> rpc.LogRequest + 29, // 25: rpc.Daemon.List:input_type -> rpc.ListRequest + 31, // 26: rpc.Daemon.Get:input_type -> rpc.GetRequest + 34, // 27: rpc.Daemon.Upgrade:input_type -> rpc.UpgradeRequest + 12, // 28: rpc.Daemon.Status:input_type -> rpc.StatusRequest + 15, // 29: rpc.Daemon.Version:input_type -> rpc.VersionRequest + 36, // 30: rpc.Daemon.Reset:input_type -> rpc.ResetRequest + 10, // 31: rpc.Daemon.Quit:input_type -> rpc.QuitRequest + 1, // 32: rpc.Daemon.Connect:output_type -> rpc.ConnectResponse + 1, // 33: rpc.Daemon.ConnectFork:output_type -> rpc.ConnectResponse + 3, // 34: rpc.Daemon.Disconnect:output_type -> rpc.DisconnectResponse + 1, // 35: rpc.Daemon.Proxy:output_type -> rpc.ConnectResponse + 5, // 36: rpc.Daemon.Leave:output_type -> rpc.LeaveResponse + 7, // 37: rpc.Daemon.Clone:output_type -> rpc.CloneResponse + 9, // 38: rpc.Daemon.Remove:output_type -> rpc.RemoveResponse + 24, // 39: rpc.Daemon.ConfigAdd:output_type -> rpc.ConfigAddResponse + 26, // 40: rpc.Daemon.ConfigRemove:output_type -> rpc.ConfigRemoveResponse + 19, // 41: rpc.Daemon.SshStart:output_type -> rpc.SshStartResponse + 21, // 42: rpc.Daemon.SshStop:output_type -> rpc.SshStopResponse + 23, // 43: rpc.Daemon.SshConnect:output_type -> rpc.SshConnectResponse + 28, // 44: rpc.Daemon.Logs:output_type -> rpc.LogResponse + 30, // 45: rpc.Daemon.List:output_type -> rpc.ListResponse + 32, // 46: rpc.Daemon.Get:output_type -> rpc.GetResponse + 35, // 47: rpc.Daemon.Upgrade:output_type -> rpc.UpgradeResponse + 13, // 48: rpc.Daemon.Status:output_type -> rpc.StatusResponse + 16, // 49: rpc.Daemon.Version:output_type -> rpc.VersionResponse + 37, // 50: rpc.Daemon.Reset:output_type -> rpc.ResetResponse + 11, // 51: rpc.Daemon.Quit:output_type -> rpc.QuitResponse + 32, // [32:52] is the sub-list for method output_type + 12, // [12:32] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_daemon_proto_init() } @@ -2841,7 +2971,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionRequest); i { + switch v := v.(*Status); i { case 0: return &v.state case 1: @@ -2853,7 +2983,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*VersionResponse); i { + switch v := v.(*VersionRequest); i { case 0: return &v.state case 1: @@ -2865,7 +2995,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigAddRequest); i { + switch v := v.(*VersionResponse); i { case 0: return &v.state case 1: @@ -2877,7 +3007,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshStartRequest); i { + switch v := v.(*ConfigAddRequest); i { case 0: return &v.state case 1: @@ -2889,7 +3019,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshStartResponse); i { + switch v := v.(*SshStartRequest); i { case 0: return &v.state case 1: @@ -2901,7 +3031,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshStopRequest); i { + switch v := v.(*SshStartResponse); i { case 0: return &v.state case 1: @@ -2913,7 +3043,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshStopResponse); i { + switch v := v.(*SshStopRequest); i { case 0: return &v.state case 1: @@ -2925,7 +3055,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshConnectRequest); i { + switch v := v.(*SshStopResponse); i { case 0: return &v.state case 1: @@ -2937,7 +3067,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshConnectResponse); i { + switch v := v.(*SshConnectRequest); i { case 0: return &v.state case 1: @@ -2949,7 +3079,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigAddResponse); i { + switch v := v.(*SshConnectResponse); i { case 0: return &v.state case 1: @@ -2961,7 +3091,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRemoveRequest); i { + switch v := v.(*ConfigAddResponse); i { case 0: return &v.state case 1: @@ -2973,7 +3103,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConfigRemoveResponse); i { + switch v := v.(*ConfigRemoveRequest); i { case 0: return &v.state case 1: @@ -2985,7 +3115,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogRequest); i { + switch v := v.(*ConfigRemoveResponse); i { case 0: return &v.state case 1: @@ -2997,7 +3127,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LogResponse); i { + switch v := v.(*LogRequest); i { case 0: return &v.state case 1: @@ -3009,7 +3139,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListRequest); i { + switch v := v.(*LogResponse); i { case 0: return &v.state case 1: @@ -3021,7 +3151,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListResponse); i { + switch v := v.(*ListRequest); i { case 0: return &v.state case 1: @@ -3033,7 +3163,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetRequest); i { + switch v := v.(*ListResponse); i { case 0: return &v.state case 1: @@ -3045,7 +3175,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetResponse); i { + switch v := v.(*GetRequest); i { case 0: return &v.state case 1: @@ -3057,7 +3187,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { + switch v := v.(*GetResponse); i { case 0: return &v.state case 1: @@ -3069,7 +3199,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpgradeRequest); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -3081,7 +3211,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpgradeResponse); i { + switch v := v.(*UpgradeRequest); i { case 0: return &v.state case 1: @@ -3093,7 +3223,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetRequest); i { + switch v := v.(*UpgradeResponse); i { case 0: return &v.state case 1: @@ -3105,7 +3235,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ResetResponse); i { + switch v := v.(*ResetRequest); i { case 0: return &v.state case 1: @@ -3117,7 +3247,7 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SshJump); i { + switch v := v.(*ResetResponse); i { case 0: return &v.state case 1: @@ -3129,6 +3259,18 @@ func file_daemon_proto_init() { } } file_daemon_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SshJump); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_daemon_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ExtraRoute); i { case 0: return &v.state @@ -3148,7 +3290,7 @@ func file_daemon_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_daemon_proto_rawDesc, NumEnums: 0, - NumMessages: 41, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/daemon/rpc/daemon.proto b/pkg/daemon/rpc/daemon.proto index 4d87ee1f..1d298216 100644 --- a/pkg/daemon/rpc/daemon.proto +++ b/pkg/daemon/rpc/daemon.proto @@ -68,7 +68,9 @@ message DisconnectRequest { // 3) disconnect by kubeConfig optional string KubeconfigBytes = 3; optional string Namespace = 4; - SshJump SshJump = 10; + SshJump SshJump = 5; + // 4) disconnect by cluster ids + repeated string ClusterIDs = 6; } message DisconnectResponse { @@ -134,11 +136,22 @@ message QuitResponse { } message StatusRequest { - string name = 1; + repeated string ClusterIDs = 1; } message StatusResponse { - string message = 1; + repeated Status List = 1; +} + +message Status { + int32 ID = 1; + string ClusterID = 2; + string Cluster = 3; + string Mode = 4; + string Kubeconfig = 5; + string Namespace = 6; + string Status = 7; + string Netif = 8; } message VersionRequest { diff --git a/pkg/handler/connect.go b/pkg/handler/connect.go index 7a3f83fb..08541bcb 100644 --- a/pkg/handler/connect.go +++ b/pkg/handler/connect.go @@ -999,6 +999,13 @@ func (c *ConnectOptions) GetLocalTunIPv4() string { return "" } +func (c *ConnectOptions) GetClusterID() string { + if c != nil && c.dhcp != nil { + return string(c.dhcp.clusterID) + } + return "" +} + func (c *ConnectOptions) upgradeDeploy(ctx context.Context) error { deployment, err := c.clientset.AppsV1().Deployments(c.Namespace).Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{}) if err != nil { diff --git a/pkg/handler/dhcp.go b/pkg/handler/dhcp.go index 5f83d244..e52c3ca9 100644 --- a/pkg/handler/dhcp.go +++ b/pkg/handler/dhcp.go @@ -16,6 +16,7 @@ import ( corev1 "k8s.io/client-go/kubernetes/typed/core/v1" "github.com/wencaiwulue/kubevpn/v2/pkg/config" + "github.com/wencaiwulue/kubevpn/v2/pkg/util" ) type DHCPManager struct { @@ -23,6 +24,7 @@ type DHCPManager struct { cidr *net.IPNet cidr6 *net.IPNet namespace string + clusterID types.UID } func NewDHCPManager(client corev1.ConfigMapInterface, namespace string) *DHCPManager { @@ -41,6 +43,7 @@ func (d *DHCPManager) initDHCP(ctx context.Context) error { if err != nil && !apierrors.IsNotFound(err) { return fmt.Errorf("failed to get configmap %s, err: %v", config.ConfigMapPodTrafficManager, err) } + d.clusterID = util.GetClusterIDByCM(cm) if err == nil { // add key envoy in case of mount not exist content if _, found := cm.Data[config.KeyEnvoy]; !found { @@ -51,6 +54,8 @@ func (d *DHCPManager) initDHCP(ctx context.Context) error { []byte(fmt.Sprintf(`{"data":{"%s":"%s"}}`, config.KeyEnvoy, "")), metav1.PatchOptions{}, ) + } + if err != nil { return fmt.Errorf("failed to patch configmap %s, err: %v", config.ConfigMapPodTrafficManager, err) } return nil @@ -66,10 +71,11 @@ func (d *DHCPManager) initDHCP(ctx context.Context) error { config.KeyRefCount: "0", }, } - _, err = d.client.Create(ctx, cm, metav1.CreateOptions{}) + cm, err = d.client.Create(ctx, cm, metav1.CreateOptions{}) if err != nil { return fmt.Errorf("create dhcp error, err: %v", err) } + d.clusterID = util.GetClusterIDByCM(cm) return nil } diff --git a/pkg/util/ns.go b/pkg/util/ns.go index 315f74f5..79ca6a8a 100644 --- a/pkg/util/ns.go +++ b/pkg/util/ns.go @@ -7,7 +7,7 @@ import ( "reflect" "unsafe" - corev1 "k8s.io/api/core/v1" + v1 "k8s.io/api/core/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" @@ -24,12 +24,16 @@ import ( "github.com/wencaiwulue/kubevpn/v2/pkg/config" ) -func GetClusterId(client v12.ConfigMapInterface) (types.UID, error) { - a, err := client.Get(context.Background(), config.ConfigMapPodTrafficManager, metav1.GetOptions{}) +func GetClusterID(ctx context.Context, client v12.ConfigMapInterface) (types.UID, error) { + configMap, err := client.Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{}) if err != nil { return "", err } - return a.UID, nil + return configMap.UID, nil +} + +func GetClusterIDByCM(cm *v1.ConfigMap) types.UID { + return cm.UID } func IsSameCluster(client v12.ConfigMapInterface, namespace string, clientB v12.ConfigMapInterface, namespaceB string) (bool, error) { @@ -37,16 +41,16 @@ func IsSameCluster(client v12.ConfigMapInterface, namespace string, clientB v12. return false, nil } ctx := context.Background() - a, err := client.Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{}) + clusterIDA, err := GetClusterID(ctx, client) if err != nil { return false, err } - var b *corev1.ConfigMap - b, err = clientB.Get(ctx, config.ConfigMapPodTrafficManager, metav1.GetOptions{}) + var clusterIDB types.UID + clusterIDB, err = GetClusterID(ctx, clientB) if err != nil { return false, err } - return a.UID == b.UID, nil + return clusterIDA == clusterIDB, nil } func ConvertToKubeConfigBytes(factory cmdutil.Factory) ([]byte, string, error) { diff --git a/pkg/util/ssh.go b/pkg/util/ssh.go index 2154945f..0bb740c7 100644 --- a/pkg/util/ssh.go +++ b/pkg/util/ssh.go @@ -524,14 +524,7 @@ func SshJump(ctx context.Context, conf *SshConfig, flags *pflag.FlagSet, print b configFlags.KubeConfig = pointer.String(temp.Name()) } else { if flags != nil { - lookup := flags.Lookup("kubeconfig") - if lookup != nil { - if lookup.Value != nil && lookup.Value.String() != "" { - configFlags.KubeConfig = pointer.String(lookup.Value.String()) - } else if lookup.DefValue != "" { - configFlags.KubeConfig = pointer.String(lookup.DefValue) - } - } + configFlags.AddFlags(flags) } } matchVersionFlags := util.NewMatchVersionFlags(configFlags) diff --git a/pkg/webhook/rpc/dhcpserver.pb.go b/pkg/webhook/rpc/dhcpserver.pb.go index 17a820ab..e01b7a95 100644 --- a/pkg/webhook/rpc/dhcpserver.pb.go +++ b/pkg/webhook/rpc/dhcpserver.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.30.0 +// protoc-gen-go v1.33.0 // protoc v3.21.2 // source: dhcpserver.proto