Copilot commented on code in PR #3299:
URL: https://github.com/apache/dubbo-go/pull/3299#discussion_r3106167686


##########
global/http3_config.go:
##########
@@ -34,14 +34,28 @@ type Http3Config struct {
        // ref: 
https://quic-go.net/docs/http3/server/#advertising-http3-via-alt-svc
        Negotiation bool `yaml:"negotiation" json:"negotiation,omitempty"`
 
-       // TODO: add more params about http3
+       // KeepAlivePeriod defines how often to send keep-alive packets.
+       KeepAlivePeriod string `yaml:"keep-alive-period" 
json:"keepAlivePeriod,omitempty"`
+
+       // MaxIdleTimeout defines the maximum idle timeout for QUIC connections.
+       MaxIdleTimeout string `yaml:"max-idle-timeout" 
json:"maxIdleTimeout,omitempty"`
+
+       // MaxIncomingStreams defines the maximum number of concurrent 
bidirectional streams.
+       MaxIncomingStreams int64 `yaml:"max-incoming-streams" 
json:"maxIncomingStreams,omitempty"`
+
+       // MaxIncomingUniStreams defines the maximum number of concurrent 
unidirectional streams.
+       MaxIncomingUniStreams int64 `yaml:"max-incoming-uni-streams" 
json:"maxIncomingUniStreams,omitempty"`

Review Comment:
   Same JSON-tag naming issue for the stream limit fields: `maxIncomingStreams` 
/ `maxIncomingUniStreams` don't match the kebab-case JSON tag convention used 
elsewhere in `global` configs. Aligning these to `max-incoming-streams` / 
`max-incoming-uni-streams` would avoid surprising JSON config behavior and keep 
tags consistent with YAML.
   ```suggestion
        MaxIncomingStreams int64 `yaml:"max-incoming-streams" 
json:"max-incoming-streams,omitempty"`
   
        // MaxIncomingUniStreams defines the maximum number of concurrent 
unidirectional streams.
        MaxIncomingUniStreams int64 `yaml:"max-incoming-uni-streams" 
json:"max-incoming-uni-streams,omitempty"`
   ```



##########
global/http3_config.go:
##########
@@ -34,14 +34,28 @@ type Http3Config struct {
        // ref: 
https://quic-go.net/docs/http3/server/#advertising-http3-via-alt-svc
        Negotiation bool `yaml:"negotiation" json:"negotiation,omitempty"`
 
-       // TODO: add more params about http3
+       // KeepAlivePeriod defines how often to send keep-alive packets.
+       KeepAlivePeriod string `yaml:"keep-alive-period" 
json:"keepAlivePeriod,omitempty"`
+
+       // MaxIdleTimeout defines the maximum idle timeout for QUIC connections.
+       MaxIdleTimeout string `yaml:"max-idle-timeout" 
json:"maxIdleTimeout,omitempty"`
+
+       // MaxIncomingStreams defines the maximum number of concurrent 
bidirectional streams.
+       MaxIncomingStreams int64 `yaml:"max-incoming-streams" 
json:"maxIncomingStreams,omitempty"`
+
+       // MaxIncomingUniStreams defines the maximum number of concurrent 
unidirectional streams.
+       MaxIncomingUniStreams int64 `yaml:"max-incoming-uni-streams" 
json:"maxIncomingUniStreams,omitempty"`

Review Comment:
   The new HTTP/3 fields use camelCase JSON tags (e.g., `keepAlivePeriod`, 
`maxIdleTimeout`), but existing config structs consistently use kebab-case JSON 
tags matching YAML (e.g., `keep-alive-interval` in global/triple_config.go:47). 
This inconsistency can break JSON-based config unmarshalling and makes the 
public config API uneven. Consider switching these JSON tags to kebab-case 
(matching the YAML tags) for consistency across `global` configs.
   ```suggestion
        KeepAlivePeriod string `yaml:"keep-alive-period" 
json:"keep-alive-period,omitempty"`
   
        // MaxIdleTimeout defines the maximum idle timeout for QUIC connections.
        MaxIdleTimeout string `yaml:"max-idle-timeout" 
json:"max-idle-timeout,omitempty"`
   
        // MaxIncomingStreams defines the maximum number of concurrent 
bidirectional streams.
        MaxIncomingStreams int64 `yaml:"max-incoming-streams" 
json:"max-incoming-streams,omitempty"`
   
        // MaxIncomingUniStreams defines the maximum number of concurrent 
unidirectional streams.
        MaxIncomingUniStreams int64 `yaml:"max-incoming-uni-streams" 
json:"max-incoming-uni-streams,omitempty"`
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to