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)
| 146 | // Notice: This function is EXPERIMENTAL and may be changed or removed in a |
| 147 | // later release. |
| 148 | func 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 | } |
no outgoing calls