This is an automated email from the ASF dual-hosted git repository.

Alanxtl pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/develop by this push:
     new b2ab70e49 chore(global): global config formatting (#3616)
b2ab70e49 is described below

commit b2ab70e49a69a023fe8205f3f39809bebf1a95f5
Author: MaoMeng <[email protected]>
AuthorDate: Sun Aug 9 12:50:03 2026 +0800

    chore(global): global config formatting (#3616)
---
 global/client_protocol_config.go |  3 ++-
 global/http3_config.go           | 10 +++-------
 global/protocol_config.go        |  7 ++++---
 global/triple_config.go          | 21 +++++++++------------
 4 files changed, 18 insertions(+), 23 deletions(-)

diff --git a/global/client_protocol_config.go b/global/client_protocol_config.go
index 4856d86c0..87d1217e4 100644
--- a/global/client_protocol_config.go
+++ b/global/client_protocol_config.go
@@ -21,11 +21,12 @@ import (
        "dubbo.apache.org/dubbo-go/v3/common/constant"
 )
 
-// ClientProtocolConfig represents the config of client's protocol
+// ClientProtocolConfig represents the config of client's protocol.
 type ClientProtocolConfig struct {
        // TODO: maybe we could use this field
        Name string `yaml:"name" json:"name,omitempty" property:"name"`
 
+       // TripleConfig holds the Triple protocol configuration.
        TripleConfig *TripleConfig `yaml:"triple" json:"triple,omitempty" 
property:"triple"`
 }
 
diff --git a/global/http3_config.go b/global/http3_config.go
index 0bd4d210d..f2a0742ad 100644
--- a/global/http3_config.go
+++ b/global/http3_config.go
@@ -17,15 +17,14 @@
 
 package global
 
-// Http3Config represents the config of http3
+// Http3Config represents the config of http3 protocol.
 type Http3Config struct {
-       // Whether to enable HTTP/3 support.
+       // Enable defines whether to enable HTTP/3 support.
        // When set to true, both HTTP/2 and HTTP/3 servers will be started 
simultaneously.
        // When set to false, only HTTP/2 server will be started.
        // The default value is false.
        Enable bool `yaml:"enable" json:"enable,omitempty"`
-
-       // Whether to enable HTTP/3 negotiation.
+       // Negotiation defines whether to enable HTTP/3 negotiation.
        // If set to true, HTTP/2 alt-svc negotiation will be enabled,
        // allowing clients to negotiate between HTTP/2 and HTTP/3.
        // If set to false, HTTP/2 alt-svc negotiation will be skipped,
@@ -36,13 +35,10 @@ type Http3Config struct {
 
        // KeepAlivePeriod defines how often to send keep-alive packets.
        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"`
 }
diff --git a/global/protocol_config.go b/global/protocol_config.go
index a0ce74f84..1eec6612e 100644
--- a/global/protocol_config.go
+++ b/global/protocol_config.go
@@ -21,7 +21,7 @@ import (
        "dubbo.apache.org/dubbo-go/v3/common/constant"
 )
 
-// ProtocolConfig is protocol configuration
+// ProtocolConfig represents the config of protocol.
 type ProtocolConfig struct {
        Name string `yaml:"name" json:"name,omitempty" property:"name"`
        Ip   string `yaml:"ip"  json:"ip,omitempty" property:"ip"`
@@ -30,18 +30,19 @@ type ProtocolConfig struct {
        // TODO: maybe Params is useless, find a ideal way to config dubbo 
protocol, ref: TripleConfig.
        Params any `yaml:"params" json:"params,omitempty" property:"params"`
 
+       // TripleConfig holds the Triple protocol configuration.
        TripleConfig *TripleConfig `yaml:"triple" json:"triple,omitempty" 
property:"triple"`
 
        // TODO: remove MaxServerSendMsgSize and MaxServerRecvMsgSize when 
version 4.0.0
        //
-       // MaxServerSendMsgSize max size of server send message, 
1mb=1000kb=1000000b 1mib=1024kb=1048576b.
+       // MaxServerSendMsgSize defines the max size of server send message, 
1mb=1000kb=1000000b 1mib=1024kb=1048576b.
        // more detail to see 
https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants
        //
        // Deprecated: use 
"ClientProtocolConfig.TripleConfig.MaxServerSendMsgSize" or in config tag 
"protocol_config/triple/max-server-send-msg-size" instead
        MaxServerSendMsgSize string `yaml:"max-server-send-msg-size" 
json:"max-server-send-msg-size,omitempty"`
        // TODO: remove MaxServerSendMsgSize and MaxServerRecvMsgSize when 
version 4.0.0
        //
-       // MaxServerRecvMsgSize max size of server receive message
+       // MaxServerRecvMsgSize defines the max size of server receive message.
        //
        // Deprecated: use 
"ClientProtocolConfig.TripleConfig.MaxServerRecvMsgSize" or in config tag 
"protocol_config/triple/max-server-recv-msg-size" instead
        MaxServerRecvMsgSize string `default:"4mib" 
yaml:"max-server-recv-msg-size" json:"max-server-recv-msg-size,omitempty"`
diff --git a/global/triple_config.go b/global/triple_config.go
index bd9a8d847..1bd620b9b 100644
--- a/global/triple_config.go
+++ b/global/triple_config.go
@@ -19,33 +19,30 @@ package global
 
 // TODO: Find an ideal way to separate the triple config of server and client.
 
-// TripleConfig represents the config of triple protocol
+// TripleConfig represents the config of triple protocol.
 type TripleConfig struct {
        //
        // for server
        //
-
-       // MaxServerSendMsgSize max size of server send message, 
1mb=1000kb=1000000b 1mib=1024kb=1048576b.
+       // MaxServerSendMsgSize defines the max size of server send message, 
1mb=1000kb=1000000b 1mib=1024kb=1048576b.
        // more detail to see 
https://pkg.go.dev/github.com/dustin/go-humanize#pkg-constants
        MaxServerSendMsgSize string `yaml:"max-server-send-msg-size" 
json:"max-server-send-msg-size,omitempty"`
-       // MaxServerRecvMsgSize max size of server receive message
+       // MaxServerRecvMsgSize defines the max size of server receive message.
        MaxServerRecvMsgSize string `yaml:"max-server-recv-msg-size" 
json:"max-server-recv-msg-size,omitempty"`
-
-       // the config of http3 transport
+       // Http3 holds the HTTP/3 transport configuration.
        Http3 *Http3Config `yaml:"http3" json:"http3,omitempty"`
-
-       // Cors configures CORS for Triple protocol handlers
+       // Cors configures CORS for Triple protocol handlers.
        Cors *CorsConfig `yaml:"cors" json:"cors,omitempty"`
-
-       // OpenAPI configures OpenAPI documentation generation
+       // OpenAPI configures OpenAPI documentation generation.
        OpenAPI *OpenAPIConfig `yaml:"openapi" json:"openapi,omitempty"`
 
        //
        // for client
        //
-
+       // KeepAliveInterval defines the duration of keep alive interval.
        KeepAliveInterval string `yaml:"keep-alive-interval" 
json:"keep-alive-interval,omitempty" property:"keep-alive-interval"`
-       KeepAliveTimeout  string `yaml:"keep-alive-timeout" 
json:"keep-alive-timeout,omitempty" property:"keep-alive-timeout"`
+       // KeepAliveTimeout defines the duration of keep alive timeout.
+       KeepAliveTimeout string `yaml:"keep-alive-timeout" 
json:"keep-alive-timeout,omitempty" property:"keep-alive-timeout"`
 }
 
 // DefaultTripleConfig returns a default TripleConfig instance.

Reply via email to