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

Method startServers

test/end2end_test.go:716–726  ·  view source on GitHub ↗

startServers starts 'num' gRPC servers exposing the provided TestService.

(ts testgrpc.TestServiceServer, num int)

Source from the content-addressed store, hash-verified

714
715// startServers starts 'num' gRPC servers exposing the provided TestService.
716func (te *test) startServers(ts testgrpc.TestServiceServer, num int) {
717 for i := 0; i < num; i++ {
718 te.startServer(ts)
719 te.srvs = append(te.srvs, te.srv.(*grpc.Server))
720 te.hSrvs = append(te.hSrvs, te.hSrv)
721 te.srvAddrs = append(te.srvAddrs, te.srvAddr)
722 te.srv = nil
723 te.hSrv = nil
724 te.srvAddr = ""
725 }
726}
727
728// setHealthServingStatus is a helper function to set the health status.
729func (te *test) setHealthServingStatus(service string, status healthpb.HealthCheckResponse_ServingStatus) {

Calls 1

startServerMethod · 0.95

Tested by

no test coverage detected