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

Method ServerHandshake

credentials/local/local.go:94–100  ·  view source on GitHub ↗
(conn net.Conn)

Source from the content-addressed store, hash-verified

92}
93
94func (*localTC) ServerHandshake(conn net.Conn) (net.Conn, credentials.AuthInfo, error) {
95 secLevel, err := getSecurityLevel(conn.RemoteAddr().Network(), conn.RemoteAddr().String())
96 if err != nil {
97 return nil, nil, err
98 }
99 return conn, info{credentials.CommonAuthInfo{SecurityLevel: secLevel}}, nil
100}
101
102// NewCredentials returns a local credential implementing credentials.TransportCredentials.
103func NewCredentials() credentials.TransportCredentials {

Callers

nothing calls this directly

Calls 4

getSecurityLevelFunction · 0.70
StringMethod · 0.65
NetworkMethod · 0.45
RemoteAddrMethod · 0.45

Tested by

no test coverage detected