File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,15 @@ func DialWithTLSConfig(tc *tls.Config) DialOpt {
130
130
}
131
131
}
132
132
133
+ // DialWithTLSDialer is a wrapper for DialWithTLSConfig with the option to
134
+ // specify a net.Dialer to for example define a timeout or a custom resolver.
135
+ func DialWithTLSDialer (tlsConfig * tls.Config , dialer * net.Dialer ) DialOpt {
136
+ return func (dc * DialContext ) {
137
+ dc .tc = tlsConfig
138
+ dc .d = dialer
139
+ }
140
+ }
141
+
133
142
// DialContext contains necessary parameters to dial the given ldap URL.
134
143
type DialContext struct {
135
144
d * net.Dialer
Original file line number Diff line number Diff line change @@ -130,6 +130,15 @@ func DialWithTLSConfig(tc *tls.Config) DialOpt {
130
130
}
131
131
}
132
132
133
+ // DialWithTLSDialer is a wrapper for DialWithTLSConfig with the option to
134
+ // specify a net.Dialer to for example define a timeout or a custom resolver.
135
+ func DialWithTLSDialer (tlsConfig * tls.Config , dialer * net.Dialer ) DialOpt {
136
+ return func (dc * DialContext ) {
137
+ dc .tc = tlsConfig
138
+ dc .d = dialer
139
+ }
140
+ }
141
+
133
142
// DialContext contains necessary parameters to dial the given ldap URL.
134
143
type DialContext struct {
135
144
d * net.Dialer
You can’t perform that action at this time.
0 commit comments