RedemptionC commented on a change in pull request #2065: URL: https://github.com/apache/apisix-dashboard/pull/2065#discussion_r687657147
########## File path: api/cmd/cache_verify.go ########## @@ -0,0 +1,49 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package cmd + +import ( + "fmt" + "github.com/spf13/cobra" + "io/ioutil" + "net/http" +) + +func newCacheVerifyCommand() *cobra.Command { + return &cobra.Command{ + Use: "cache-verify", + Short: "verify that data in cache are consistent with that in ETCD", + Run: func(cmd *cobra.Command, args []string) { + rsp, err := http.Get("http://localhost:9000/apisix/admin/cache_verify") Review comment: how do we know which port is manager API running on? we can not use conf.ServerPort,as it will be 80(the default value) when we run cache_verify command should we read the configuration file?but it will result in quite a few duplicate code can we ask user to pass them as command line arguments? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
