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

Function newALTS

credentials/alts/alts.go:153–169  ·  view source on GitHub ↗
(side core.Side, accounts []string, hsAddress string)

Source from the content-addressed store, hash-verified

151}
152
153func newALTS(side core.Side, accounts []string, hsAddress string) credentials.TransportCredentials {
154 once.Do(func() {
155 vmOnGCP = googlecloud.OnGCE()
156 })
157 if hsAddress == "" {
158 hsAddress = hypervisorHandshakerServiceAddress
159 }
160 return &altsTC{
161 info: &credentials.ProtocolInfo{
162 SecurityProtocol: "alts",
163 SecurityVersion: "1.0",
164 },
165 side: side,
166 accounts: accounts,
167 hsAddress: hsAddress,
168 }
169}
170
171// ClientHandshake implements the client side handshake protocol.
172func (g *altsTC) ClientHandshake(ctx context.Context, addr string, rawConn net.Conn) (_ net.Conn, _ credentials.AuthInfo, err error) {

Callers 3

NewClientCredsFunction · 0.85
NewServerCredsFunction · 0.85
NewWithModeMethod · 0.85

Calls 2

OnGCEFunction · 0.92
DoMethod · 0.65

Tested by

no test coverage detected