1
0
Эх сурвалжийг харах

refactor, and add comments to describe graceful shutdown (#564)

Kevin Wan 4 жил өмнө
parent
commit
fcd15c9b17

+ 0 - 0
core/fx/fn.go → core/fx/stream.go


+ 0 - 0
core/fx/fn_test.go → core/fx/stream_test.go


+ 2 - 0
rest/server.go

@@ -77,6 +77,8 @@ func (e *Server) AddRoute(r Route, opts ...RouteOption) {
 }
 
 // Start starts the Server.
+// Graceful shutdown is enabled by default.
+// Use proc.SetTimeToForceQuit to customize the graceful shutdown period.
 func (e *Server) Start() {
 	handleError(e.opts.start(e.ngin))
 }

+ 2 - 0
zrpc/server.go

@@ -79,6 +79,8 @@ func (rs *RpcServer) AddUnaryInterceptors(interceptors ...grpc.UnaryServerInterc
 }
 
 // Start starts the RpcServer.
+// Graceful shutdown is enabled by default.
+// Use proc.SetTimeToForceQuit to customize the graceful shutdown period.
 func (rs *RpcServer) Start() {
 	if err := rs.server.Start(rs.register); err != nil {
 		logx.Error(err)