MCPcopy
hub / github.com/grpc/grpc-go / GracefulStop

Method GracefulStop

xds/server.go:225–231  ·  view source on GitHub ↗

GracefulStop stops the underlying gRPC server gracefully. It stops the server from accepting new connections and RPCs and blocks until all the pending RPCs are finished.

()

Source from the content-addressed store, hash-verified

223// from accepting new connections and RPCs and blocks until all the pending RPCs
224// are finished.
225func (s *GRPCServer) GracefulStop() {
226 s.quit.Fire()
227 s.gs.GracefulStop()
228 if s.xdsC != nil {
229 s.xdsClientClose()
230 }
231}
232
233// xdsUnaryInterceptor is the unary interceptor added to the gRPC server to
234// perform any xDS specific functionality on unary RPCs.

Callers

nothing calls this directly

Implementers 3

Serverserver.go
GRPCServerxds/server.go
fakeGRPCServerxds/server_test.go

Calls 2

GracefulStopMethod · 0.65
FireMethod · 0.45

Tested by

no test coverage detected