Expand description
Shared duration string codec for the typed slots that take a
duration (restart_window, MeshPolicy::timeout,
CircuitBreaker::window, …). Public so crate::aplicacao can
reuse it without duplicating the parser.
Functions§
- deserialize
- is_
integer_ millisecond_ duration - True iff
dround-trips losslessly throughrender+ [parse]. - render
- Render a
Durationin the canonical pleme-io duration string form ("30s","1m","1h","500ms"). The same form every caixa typed-duration slot serializes to and the same form K8s Gateway API HTTPRoutetimeouts/backendRequestand Cilium EnvoyConfig per-route timeouts both expect (an integer followed bys/m/h/ms, no fractional values, no leading+). Lifted topubso caixa-side renderers (caixa-mesh::gateway_routes’s :politicas :timeout overlay, the future per-:politicasCiliumClusterwideEnvoyConfigemitter, the future caixa-otel collector pipeline emitter) can consume the same canonical formatter without re-inlining the magnitude/unit decision tree (and inheriting the same drift footguns: a subtly different300msvs0.3srendering breaks downstream apply-time parsing in non-obvious ways). - serialize