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

Function main

examples/features/metadata_interceptor/server/main.go:153–164  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

151}
152
153func main() {
154 flag.Parse()
155 lis, err := net.Listen("tcp", fmt.Sprintf(":%d", *port))
156 if err != nil {
157 log.Fatalf("net.Listen() failed: %v", err)
158 }
159 fmt.Printf("Server listening at %v\n", lis.Addr())
160
161 s := grpc.NewServer(grpc.UnaryInterceptor(unaryInterceptor), grpc.StreamInterceptor(streamInterceptor))
162 pb.RegisterEchoServer(s, &server{})
163 s.Serve(lis)
164}

Callers

nothing calls this directly

Calls 8

ServeMethod · 0.95
NewServerFunction · 0.92
UnaryInterceptorFunction · 0.92
StreamInterceptorFunction · 0.92
ParseMethod · 0.65
FatalfMethod · 0.65
PrintfMethod · 0.65
AddrMethod · 0.45

Tested by

no test coverage detected