[pkg/ottl] Converter Function that is able to create a new time.Duration
type from a string.
#22015
Labels
time.Duration
type from a string.
#22015
Uh oh!
There was an error while loading. Please reload this page.
In order to facilitate proper time manipulation, arithmetic, and comparison it will be very useful to have Durations.
Create an OTTL Converter Function, probably called
Duration
, that is able to create a newtime.Duration
type from a string. Something similar to https://pkg.go.dev/time#ParseDuration can be used.The function should take 1 parameters, a string (represented as a
StringGetter
) that represents the duration in Go format, such as1s
for 1 second or2h
for 2 hours or3m30s
for 3 minutes and 30 seconds.The text was updated successfully, but these errors were encountered: