Description
Proposal Details
Similar to #20288 which added a DialContext
method to ssh.Client
, we propose to add a top-level convenience function DialContext
to the crypto/ssh
package which mirrors the existing Dial
func:
func DialContext(ctx context.Context, network, addr string, config *ClientConfig) (*Client, error)
The DialContext
func would accept a context.Context
as its first argument, which would control the dial and handshake phases of the connection. Closing the Context after the connection is established would have no effect on the resulting Client
. This is consistent with other DialContext
uses in the Go standard library and this package.
We have a change ready to go (~33 SLOC), so happy to submit a CL when/if this is approved.
Metadata
Metadata
Assignees
Type
Projects
Status
Incoming