add comments
This commit is contained in:
@ -104,6 +104,9 @@ func WithDialer(f func(addr string, timeout time.Duration) (net.Conn, error)) Di
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// WithHandshaker returns a DialOption that specifies a function to perform some handshaking
|
||||||
|
// with the server. It is typically used to negotiate the wire protocol version and security
|
||||||
|
// protocol with the server.
|
||||||
func WithHandshaker(h func(conn net.Conn) (credentials.TransportAuthenticator, error)) DialOption {
|
func WithHandshaker(h func(conn net.Conn) (credentials.TransportAuthenticator, error)) DialOption {
|
||||||
return func(o *dialOptions) {
|
return func(o *dialOptions) {
|
||||||
o.copts.Handshaker = h
|
o.copts.Handshaker = h
|
||||||
|
Reference in New Issue
Block a user