This is an automated email from the ASF dual-hosted git repository. mark4z pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/dubbo-go-pixiu-samples.git
The following commit(s) were added to refs/heads/main by this push: new 59922d9 remove istio (#51) 59922d9 is described below commit 59922d91b18f9a5447c9703542fd823b8ed34be2 Author: Mark4z <36187602+mar...@users.noreply.github.com> AuthorDate: Sat Apr 20 15:05:01 2024 +0800 remove istio (#51) --- dubbogo/simple/body/server/app/server.go | 4 ++++ dubbogo/simple/body/server/profiles/dev/server.yml | 9 ++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/dubbogo/simple/body/server/app/server.go b/dubbogo/simple/body/server/app/server.go index f8ebcd3..73ef694 100644 --- a/dubbogo/simple/body/server/app/server.go +++ b/dubbogo/simple/body/server/app/server.go @@ -26,6 +26,7 @@ import ( ) import ( + "dubbo.apache.org/dubbo-go/v3/common/logger" "dubbo.apache.org/dubbo-go/v3/config" _ "dubbo.apache.org/dubbo-go/v3/imports" ) @@ -38,6 +39,7 @@ var survivalTimeout = int(3e9) // export APP_LOG_CONF_FILE="xxx" func main() { config.Load() + logger.Infof("dubbo version is: %s", Version) initSignal() } @@ -47,11 +49,13 @@ func initSignal() { signal.Notify(signals, os.Interrupt, syscall.SIGHUP, syscall.SIGQUIT, syscall.SIGTERM, syscall.SIGINT) for { sig := <-signals + logger.Infof("get signal %s", sig.String()) switch sig { case syscall.SIGHUP: // reload() default: time.AfterFunc(time.Duration(survivalTimeout), func() { + logger.Warnf("app exit now by force...") os.Exit(1) }) diff --git a/dubbogo/simple/body/server/profiles/dev/server.yml b/dubbogo/simple/body/server/profiles/dev/server.yml index 42eaca3..bc3560e 100644 --- a/dubbogo/simple/body/server/profiles/dev/server.yml +++ b/dubbogo/simple/body/server/profiles/dev/server.yml @@ -22,18 +22,13 @@ dubbo: registries: zk: - protocol: nacos + protocol: zookeeper timeout: 3s - address: 127.0.0.1:8848 - username: nacos - password: nacos + address: 127.0.0.1:2181 protocols: dubbo: name: dubbo port: 20000 - tri: - name: tri - port: 20001 provider: registry-ids: zk services: