Expand description
Durations ("30s", "5m", "1h30m") and sizes ("4MiB") in configuration values.
Structs§
- Duration
Text - The JSON Schema of a duration field: a string with format
duration. - Size
Text - The JSON Schema of a size field: a string with format
size.
Enums§
- Memory
Reserve [worker] memory_reserve: the part of the pod’s memory limit kept out of task budgets.- Unit
Error - Why a string isn’t a valid duration or size.
Functions§
- deserialize_
duration - A serde
deserialize_withhelper for duration fields. - deserialize_
mode_ text - A serde
deserialize_withhelper for a file mode in octal text ("0640"). A whole number is taken by its digits, as the environment givesSCHEDR_CONFIG__WORKER__LOG_MODE=0640as 640: those digits are read as octal too, and checked as the text would be. - deserialize_
optional_ duration - A serde
deserialize_withhelper for optional duration fields (Nonewhen left out). - deserialize_
optional_ size - A serde
deserialize_withhelper for optional size fields (Nonewhen left out). - deserialize_
size - A serde
deserialize_withhelper for size fields. - format_
duration - Writes a duration as
parse_durationreads it, in the largest units that are exact (2m, not120s;1h30m;0sfor zero). - format_
reserve - Writes a memory reserve as
parse_reservereads it. - format_
size - Writes a size as
parse_sizereads it, in the largest unit that is exact (4MiB, not4096KiB). - parse_
duration - Parses a duration: one or more
<number><unit>parts with unitsms,s,m,h,d, each unit at most once and from largest to smallest (1h30m, not30m1h). - parse_
reserve - Parses a memory reserve:
<n>%withnat most 90, or a size (seeparse_size). - parse_
size - Parses a size: a whole number followed by
B,KiB,MiBorGiB. - serialize_
duration - A serde
serialize_withhelper for duration fields (seeformat_duration). - serialize_
optional_ duration - A serde
serialize_withhelper for optional duration fields (seeformat_duration). - serialize_
optional_ size - A serde
serialize_withhelper for optional size fields (seeformat_size). - serialize_
size - Writes a size as
format_sizedoes.