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

Method handleServerOptions

xds/server.go:125–133  ·  view source on GitHub ↗

handleServerOptions iterates through the list of server options passed in by the user, and handles the xDS server specific options.

(opts []grpc.ServerOption)

Source from the content-addressed store, hash-verified

123// handleServerOptions iterates through the list of server options passed in by
124// the user, and handles the xDS server specific options.
125func (s *GRPCServer) handleServerOptions(opts []grpc.ServerOption) {
126 so := s.defaultServerOptions()
127 for _, opt := range opts {
128 if o, ok := opt.(*serverOption); ok {
129 o.apply(so)
130 }
131 }
132 s.opts = so
133}
134
135func (s *GRPCServer) defaultServerOptions() *serverOptions {
136 return &serverOptions{

Callers 1

NewGRPCServerFunction · 0.95

Implementers 3

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

Calls 2

defaultServerOptionsMethod · 0.95
applyMethod · 0.65

Tested by

no test coverage detected