scrapli / scrapligo

scrapli, but in go!
MIT License
258 stars 42 forks source link

Support modifying TimeoutSocket using standard transport #155

Closed patrickfnielsen closed 1 year ago

patrickfnielsen commented 1 year ago

Right now it seems there is no way to modify the dial timeout when using standard transport: https://github.com/scrapli/scrapligo/blob/0ae361300f6ef3f3d402c59567af66fb671ba6eb/transport/standard.go#L147

There is WithTimeoutOps for channel operations, but that does not modify the dial timeout in anyway as far as I can see. I suggest we add an option to allow modifying dial timeout, as the default might not always be desirable.

I'll be happy to help with a PR if you needed :)

carlmontanari commented 1 year ago

well would you look at that! hehe... my bad! yeah we should expose that timeout socket with an option somewhere around here (which as a side note is a lame place to put transport options but.... I guess my thinking at the time was to put them all in one place... so here we are 🤣 )

a pr would be most welcome, thank you @patrickfnielsen

carlmontanari commented 1 year ago

closing, can wrap up in #156 -- thanks again!