Skip to main content

Module units

Module units 

Source
Expand description

Sizes and durations written with their unit: 512MiB, 250ms. One parser reads them from a config file, from -c and from a flag, so a value means the same wherever it is written.

Structs§

ByteSize
A size in bytes, written with its unit in config: max_buffered = "512MiB".
Interval
A duration written with its unit in config: follow_interval = "250ms".

Functions§

format_duration
duration in the largest unit that holds it whole: 250ms, 2s, 1m.
format_size
bytes in the largest binary unit that holds it whole: 512MiB, 100KiB.
parse_duration
A duration from 250ms, 1.5s, 2m or 0.
parse_size
Bytes from 512MiB, 2GiB, 1.5GB or 0.