Documentation
¶
Overview ¶
Package duration reads the durations a workflow is written with: a step's timeout and wait, the interval of a repeat or a retry, and the timeout an action takes. A duration is a Go duration string such as "30s" or "1m30s", or a number of seconds, which may have a fraction, such as 1.5.
Index ¶
Constants ¶
MaxSeconds is the most whole seconds a time.Duration can hold, about 292 years.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse reads v as a duration: a time.Duration, a duration string, a number of seconds, or a string of one, with the spaces around it ignored. Zero is a duration; whether it means none, no limit or the default is for the caller to say. Parse refuses a negative value, one too long for a time.Duration rather than wrapping it around to another, and one above zero but below a nanosecond. A fraction of a second is rounded to the nearest nanosecond, so that 4.1, which as a float is a little below 4.1, is 4.1s and not a nanosecond less. The error says why, and not what v was, so that the caller can name the field.
Types ¶
This section is empty.