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

Method ClientHandshake

credentials/google/xds.go:95–102  ·  view source on GitHub ↗
(ctx context.Context, authority string, rawConn net.Conn)

Source from the content-addressed store, hash-verified

93}
94
95func (c *clusterTransportCreds) ClientHandshake(ctx context.Context, authority string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) {
96 if isDirectPathCluster(ctx) {
97 // If attributes have cluster name, and cluster name is not cfe, it's a
98 // backend address, use ALTS.
99 return c.alts.ClientHandshake(ctx, authority, rawConn)
100 }
101 return c.tls.ClientHandshake(ctx, authority, rawConn)
102}
103
104func (c *clusterTransportCreds) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error) {
105 return c.tls.ServerHandshake(conn)

Callers

nothing calls this directly

Calls 2

isDirectPathClusterFunction · 0.85
ClientHandshakeMethod · 0.65

Tested by

no test coverage detected