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

Function NewServerV1

reflection/serverreflection.go:148–160  ·  view source on GitHub ↗

NewServerV1 returns a reflection server implementation using the given options. This can be used to customize behavior of the reflection service. Most usages should prefer to use Register instead. # Experimental Notice: This function is EXPERIMENTAL and may be changed or removed in a later release

(opts ServerOptions)

Source from the content-addressed store, hash-verified

146// Notice: This function is EXPERIMENTAL and may be changed or removed in a
147// later release.
148func NewServerV1(opts ServerOptions) v1reflectiongrpc.ServerReflectionServer {
149 if opts.DescriptorResolver == nil {
150 opts.DescriptorResolver = protoregistry.GlobalFiles
151 }
152 if opts.ExtensionResolver == nil {
153 opts.ExtensionResolver = protoregistry.GlobalTypes
154 }
155 return &internal.ServerReflectionServer{
156 S: opts.Services,
157 DescResolver: opts.DescriptorResolver,
158 ExtResolver: opts.ExtensionResolver,
159 }
160}

Callers 5

RegisterFunction · 0.85
RegisterV1Function · 0.85
NewServerFunction · 0.85

Calls

no outgoing calls

Tested by 1