Expand description
grpc-timeout header codec.
The wire format is <positive_integer><unit> where unit is one of
H, M, S, m, u, n (hour, minute, second, millisecond,
microsecond, nanosecond). The integer is at most 8 ASCII digits.
When formatting a Duration we pick the smallest unit that fits in 8
digits and round up, so the wire value is always ≥ the requested
duration — we never advertise a tighter deadline than asked.
Functions§
- format_
grpc_ timeout - Format a
Durationas agrpc-timeoutheader value. - parse_
grpc_ timeout - Parse a
grpc-timeoutheader value into aDuration. ReturnsNonefor malformed input (empty, missing/unknown unit, non-digit body, or arithmetic overflow).