Alanxtl commented on code in PR #3657:
URL: https://github.com/apache/dubbo-go/pull/3657#discussion_r3780181647


##########
metadata/options.go:
##########
@@ -80,37 +89,46 @@ func (opts *Options) Init() error {
        return err
 }
 
+// Option configures an Options instance.
 type Option func(*Options)
 
+// WithAppName sets the application owning the metadata service.
 func WithAppName(app string) Option {
        return func(options *Options) {
                options.appName = app
        }
 }
 
+// WithMetadataType sets the metadata storage type.

Review Comment:
   加一下都可以传入什么type



##########
metadata/options.go:
##########
@@ -80,37 +89,46 @@ func (opts *Options) Init() error {
        return err
 }
 
+// Option configures an Options instance.
 type Option func(*Options)
 
+// WithAppName sets the application owning the metadata service.
 func WithAppName(app string) Option {
        return func(options *Options) {
                options.appName = app
        }
 }
 
+// WithMetadataType sets the metadata storage type.
 func WithMetadataType(typ string) Option {
        return func(options *Options) {
                options.metadataType = typ
        }
 }
 
+// WithPort sets the metadata service listen port.
 func WithPort(port int) Option {
        return func(options *Options) {
                options.port = port
        }
 }
 
+// WithMetadataProtocol sets the metadata service protocol.

Review Comment:
   ditto



##########
metadata/options.go:
##########
@@ -193,26 +214,31 @@ func NewReportOptions(opts ...ReportOption) 
*ReportOptions {
        return reportOptions
 }
 
+// ReportOption configures a ReportOptions instance.
 type ReportOption func(*ReportOptions)
 
+// WithZookeeper sets the metadata report protocol to zookeeper.
 func WithZookeeper() ReportOption {
        return func(opts *ReportOptions) {
                opts.Protocol = constant.ZookeeperKey
        }
 }
 
+// WithNacos sets the metadata report protocol to nacos.
 func WithNacos() ReportOption {
        return func(opts *ReportOptions) {
                opts.Protocol = constant.NacosKey
        }
 }
 
+// WithEtcdV3 sets the metadata report protocol to etcd v3.
 func WithEtcdV3() ReportOption {
        return func(opts *ReportOptions) {
                opts.Protocol = constant.EtcdV3Key
        }
 }
 
+// WithProtocol sets the metadata report protocol.

Review Comment:
   说一下是用来传入自定义protocol的 目前内部支持WithZookeeper WithNacos WithEtcdV3



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