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

Function main

interop/observability/server/server.go:44–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42)
43
44func main() {
45 err := observability.Start(context.Background())
46 if err != nil {
47 log.Fatalf("observability start failed: %v", err)
48 }
49 defer observability.End()
50 flag.Parse()
51 lis, err := net.Listen("tcp", fmt.Sprintf(":%d", *port))
52 if err != nil {
53 log.Fatalf("failed to listen: %v", err)
54 }
55 server := grpc.NewServer()
56 defer server.Stop()
57 testgrpc.RegisterTestServiceServer(server, interop.NewTestServer())
58 log.Printf("Observability interop server listening on %v", lis.Addr())
59 server.Serve(lis)
60}

Callers

nothing calls this directly

Calls 10

StopMethod · 0.95
ServeMethod · 0.95
StartFunction · 0.92
EndFunction · 0.92
NewServerFunction · 0.92
NewTestServerFunction · 0.92
FatalfMethod · 0.65
ParseMethod · 0.65
PrintfMethod · 0.65
AddrMethod · 0.45

Tested by

no test coverage detected