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

Method StartServer

internal/stubserver/stubserver.go:208–217  ·  view source on GitHub ↗

StartServer only starts the server. It does not create a client to it. Cannot be used in a StubServer that also used StartHandlerServer.

(sopts ...grpc.ServerOption)

Source from the content-addressed store, hash-verified

206// StartServer only starts the server. It does not create a client to it.
207// Cannot be used in a StubServer that also used StartHandlerServer.
208func (ss *StubServer) StartServer(sopts ...grpc.ServerOption) error {
209 lis, err := ss.setupServer(sopts...)
210 if err != nil {
211 return err
212 }
213
214 go ss.S.Serve(lis)
215
216 return nil
217}
218
219// StartClient creates a client connected to this service that the test may use.
220// The newly created client will be available in the Client field of StubServer.

Calls 2

setupServerMethod · 0.95
ServeMethod · 0.65