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)
| 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. |
| 208 | func (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. |