Skip to content

Commit

Permalink
add document to ClientHandshake about returning temporary error (#1125)
Browse files Browse the repository at this point in the history
  • Loading branch information
menghanl authored Mar 28, 2017
1 parent 0df08a7 commit ccdf270
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions credentials/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ type TransportCredentials interface {
// authentication protocol on rawConn for clients. It returns the authenticated
// connection and the corresponding auth information about the connection.
// Implementations must use the provided context to implement timely cancellation.
// gRPC will try to reconnect if the error returned is a temporary error
// (io.EOF, context.DeadlineExceeded or err.Temporary() == true).
// If the returned error is a wrapper error, implementations should make sure that
// the error implements Temporary() to have the correct retry behaviors.
ClientHandshake(context.Context, string, net.Conn) (net.Conn, AuthInfo, error)
// ServerHandshake does the authentication handshake for servers. It returns
// the authenticated connection and the corresponding auth information about
Expand Down

0 comments on commit ccdf270

Please sign in to comment.