AlexStocks commented on code in PR #3657:
URL: https://github.com/apache/dubbo-go/pull/3657#discussion_r3781022812
##########
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:
[P1] 这里补充的兜底语义与公开行为不一致。`WithMetadataType` 只原样保存字符串;`Options.Init` 虽然会让非
`remote` 值走本地导出分支,但 `GetMetadataType()` 会原样返回该非法值,`createInstance` 还会把它写入
`dubbo.metadata.storage-type`。固定当前 Head 的公开入口探针传入 `unsupported` 后输出也是
`unsupported`,并没有归一化为 `local`。请改成精确说明“非 remote 仅使用本地导出路径、原值仍对外可见”,或者在
setter/读取处真正校验并归一化,并补一个无效值边界测试。
--
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]