1kasa commented on code in PR #2900:
URL: https://github.com/apache/dubbo-go/pull/2900#discussion_r2112806092


##########
global/protocol_client_config.go:
##########
@@ -0,0 +1,50 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package global
+
+import (
+       "dubbo.apache.org/dubbo-go/v3/common/constant"
+)
+
+// TODO: find a better name replace ProtocolClientConfig

Review Comment:
   If we support multi-protocol client configuration in the future, I think it 
can be named ClientProtocolsConfig. If we decide to only configure triple 
protocol, I think TripleClientConfig will do. What do you think? Or do you have 
any other ideas?



##########
protocol/options.go:
##########
@@ -27,20 +27,84 @@ import (
        "dubbo.apache.org/dubbo-go/v3/protocol/triple"
 )
 
-type Options struct {
+type ClientOption interface {
+       applyToClient(*ClientOptions)
+}
+
+type ServerOption interface {
+       applyToServer(*ServerOptions)
+}
+
+type Option interface {
+       ClientOption
+       ServerOption
+}
+
+// WithClientOptions composes multiple ClientOptions into one.
+func WithClientOptions(options ...ClientOption) ClientOption {
+       return &clientOptionsOption{options}
+}
+
+type clientOptionsOption struct {
+       options []ClientOption

Review Comment:
   The S in ServerOptionsOption is capitalized, and the c in 
clientOptionsOption is lowercase. Is there any special purpose for doing this?



##########
common/constant/default.go:
##########
@@ -28,7 +28,10 @@ const (
        OverrideProtocol = "override" //compatible with 2.6.x
        EmptyProtocol    = "empty"
        RouterProtocol   = "router"
+       DubboProtocol    = "dubbo"

Review Comment:
   I think it will cause some trouble.Dubbo And DubboProtocol.



-- 
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