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

Function main

examples/features/metadata_interceptor/client/main.go:97–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

95}
96
97func main() {
98 flag.Parse()
99
100 conn, err := grpc.NewClient(*addr, grpc.WithTransportCredentials(insecure.NewCredentials()))
101 if err != nil {
102 log.Fatalf("grpc.NewClient(%q): %v", *addr, err)
103 }
104 defer conn.Close()
105
106 ec := pb.NewEchoClient(conn)
107
108 ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
109 defer cancel()
110
111 callUnaryEcho(ctx, ec)
112
113 callBidiStreamingEcho(ctx, ec)
114}

Callers

nothing calls this directly

Calls 8

NewClientFunction · 0.92
WithTransportCredentialsFunction · 0.92
NewCredentialsFunction · 0.92
callUnaryEchoFunction · 0.70
callBidiStreamingEchoFunction · 0.70
ParseMethod · 0.65
FatalfMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected