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

Function main

examples/features/encryption/ALTS/client/main.go:47–63  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

45}
46
47func main() {
48 flag.Parse()
49
50 // Create alts based credential.
51 altsTC := alts.NewClientCreds(alts.DefaultClientOptions())
52
53 // Set up a connection to the server.
54 conn, err := grpc.NewClient(*addr, grpc.WithTransportCredentials(altsTC))
55 if err != nil {
56 log.Fatalf("did not connect: %v", err)
57 }
58 defer conn.Close()
59
60 // Make an echo client and send an RPC.
61 rgc := ecpb.NewEchoClient(conn)
62 callUnaryEcho(rgc, "hello world")
63}

Callers

nothing calls this directly

Calls 8

NewClientCredsFunction · 0.92
DefaultClientOptionsFunction · 0.92
NewClientFunction · 0.92
WithTransportCredentialsFunction · 0.92
callUnaryEchoFunction · 0.70
ParseMethod · 0.65
FatalfMethod · 0.65
CloseMethod · 0.65

Tested by

no test coverage detected