withMinConnectDeadline specifies the function that clientconn uses to get minConnectDeadline. This can be used to make connection attempts happen faster/slower. For testing purpose only.
(f func() time.Duration)
| 740 | // |
| 741 | // For testing purpose only. |
| 742 | func withMinConnectDeadline(f func() time.Duration) DialOption { |
| 743 | return newFuncDialOption(func(o *dialOptions) { |
| 744 | o.minConnectTimeout = f |
| 745 | }) |
| 746 | } |
| 747 | |
| 748 | // withDefaultScheme is used to allow Dial to use "passthrough" as the default |
| 749 | // name resolver, while NewClient uses "dns" otherwise. |