MCPcopy
hub / github.com/grpc-ecosystem/grpc-gateway / runServers

Function runServers

examples/internal/integration/main_test.go:56–74  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

54}
55
56func runServers(ctx context.Context) <-chan error {
57 ch := make(chan error, 3)
58 go func() {
59 if err := server.Run(ctx, *network, *endpoint); err != nil {
60 ch <- fmt.Errorf("cannot run grpc service: %v", err)
61 }
62 }()
63 go func() {
64 if err := runGateway(ctx, ":8088"); err != nil {
65 ch <- fmt.Errorf("cannot run gateway service: %v", err)
66 }
67 }()
68 go func() {
69 if err := server.RunInProcessGateway(ctx, ":8089"); err != nil {
70 ch <- fmt.Errorf("cannot run in process gateway service: %v", err)
71 }
72 }()
73 return ch
74}
75
76func TestMain(m *testing.M) {
77 flag.Parse()

Callers 1

TestMainFunction · 0.85

Calls 3

RunFunction · 0.92
RunInProcessGatewayFunction · 0.92
runGatewayFunction · 0.85

Tested by

no test coverage detected