XiaoFeiASK commented on code in PR #1133:
URL: https://github.com/apache/dubbo-go-samples/pull/1133#discussion_r3772222739


##########
graceful_shutdown/go-client/cmd/main.go:
##########
@@ -47,10 +47,20 @@ func main() {
        maxRequests := flag.Int64("max-requests", 0, "maximum number of 
requests to issue across all workers, 0 means unlimited")
        minSuccesses := flag.Int64("min-successes", 0, "minimum number of 
successful requests required before exit")
        minFailures := flag.Int64("min-failures", 0, "minimum number of failed 
requests required before exit")
+       scenario := flag.String("scenario", "", "optional integration scenario 
to run, supported: graceful-shutdown")
        flag.Parse()
 
        logger.Infof("Starting client, addr=%s short=%v concurrency=%d 
interval=%s request-timeout=%s",
                *addr, *shortConn, *concurrency, interval.String(), 
requestTimeout.String())
+       if *scenario != "" {
+               switch *scenario {
+               case "graceful-shutdown":
+                       runGracefulShutdownScenario(*addr, *shortConn, 
*requestTimeout, *namePrefix)
+               default:
+                       panic(fmt.Sprintf("unsupported scenario: %s", 
*scenario))
+               }
+               return
+       }

Review Comment:
   ok😀



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to