Skip to content

config: support google.protobuf.Duration strings#9

Open
csssuf wants to merge 1 commit into
mainfrom
duration
Open

config: support google.protobuf.Duration strings#9
csssuf wants to merge 1 commit into
mainfrom
duration

Conversation

@csssuf
Copy link
Copy Markdown
Owner

@csssuf csssuf commented Apr 18, 2026

Accept the canonical protobuf JSON form for Duration fields (e.g. "5s", "1.5s", "-0.25s") alongside the {seconds, nanos} struct form that xds-api's pbjson-generated deserializers require. Duration appears across many Envoy types (HCM timeouts, listener filter timeout, cluster connect timeout, etc.), so the conversion walks the full JSON tree once before typed_config encoding and top-level deserialization.

Accept the canonical protobuf JSON form for Duration fields (e.g.
"5s", "1.5s", "-0.25s") alongside the {seconds, nanos} struct form
that xds-api's pbjson-generated deserializers require. Duration
appears across many Envoy types (HCM timeouts, listener filter
timeout, cluster connect timeout, etc.), so the conversion walks the
full JSON tree once before typed_config encoding and top-level
deserialization.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant