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

Function RegisterServiceServerOption

internal/stubserver/stubserver.go:137–139  ·  view source on GitHub ↗

RegisterServiceServerOption returns a ServerOption that will run f() in Start or StartServer with the grpc.Server created before serving. This allows other services to be registered on the test server (e.g. ORCA, health, or reflection).

(f func(grpc.ServiceRegistrar))

Source from the content-addressed store, hash-verified

135// allows other services to be registered on the test server (e.g. ORCA,
136// health, or reflection).
137func RegisterServiceServerOption(f func(grpc.ServiceRegistrar)) grpc.ServerOption {
138 return &registerServiceServerOption{f: f}
139}
140
141func (ss *StubServer) setupServer(sopts ...grpc.ServerOption) (net.Listener, error) {
142 if ss.Network == "" {

Callers 3

startORCAServerFunction · 0.92
startServerFunction · 0.92

Calls

no outgoing calls

Tested by 3

startORCAServerFunction · 0.74
startServerFunction · 0.74