Use native consul time values on Session.create
Since the consul API raises an error when the session TTL is below 10 or above 3600 seconds we don't have to do a check. The reason why this should not be done is to allow default time values like "5s", "30m" or "2h". The same with lock delay.
Note that this could break some code which is using this lib since consul assumes milliseconds per default when no other unit is given.
Hi thanks for this. Yeah, I've been thinking through this. At the very least the lib should be consistent in how it handles time values.
So it should always be you pass an integer value that is a certain time unit, or you always pass a human friendly string value.
You're right, if we merge this patch it will break current uses of the lib (case in point, this comment breaks the tests).