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

Function main

examples/features/stats_monitoring/server/main.go:48–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

46}
47
48func main() {
49 flag.Parse()
50 lis, err := net.Listen("tcp", fmt.Sprintf(":%d", *port))
51 if err != nil {
52 log.Fatalf("failed to listen on port %d: %v", *port, err)
53 }
54 log.Printf("server listening at %v\n", lis.Addr())
55
56 s := grpc.NewServer(grpc.StatsHandler(statshandler.New()))
57 echogrpc.RegisterEchoServer(s, &server{})
58
59 if err := s.Serve(lis); err != nil {
60 log.Fatalf("failed to serve: %v", err)
61 }
62}

Callers

nothing calls this directly

Calls 8

ServeMethod · 0.95
NewServerFunction · 0.92
StatsHandlerFunction · 0.92
NewFunction · 0.92
ParseMethod · 0.65
FatalfMethod · 0.65
PrintfMethod · 0.65
AddrMethod · 0.45

Tested by

no test coverage detected