hanahmily commented on code in PR #331:
URL: 
https://github.com/apache/skywalking-banyandb/pull/331#discussion_r1328091946


##########
banyand/metadata/client.go:
##########
@@ -56,6 +71,11 @@ func (s *clientService) FlagSet() *run.FlagSet {
        fs := run.NewFlagSet("metadata")
        fs.StringVar(&s.namespace, "namespace", "banyandb", "The namespace of 
the metadata stored in etcd")
        fs.StringArrayVar(&s.endpoints, flagEtcdEndpointsName, 
[]string{"http://localhost:2379"}, "A comma-delimited list of etcd endpoints")
+       fs.StringVar(&s.etcdUsername, flagEtcdUsername, "", "A username of 
etcd")
+       fs.StringVar(&s.etcdPassword, flagEtcdPassword, "", "A password of etcd 
user")
+       fs.StringVar(&s.etcdTLSCAFile, flagEtcdTLSCAFile, "", "A trusted ca 
file of etcd tls config")
+       fs.StringVar(&s.etcdTLSCertFile, flagEtcdTLSCertFile, "", "A cert file 
of etcd tls config")

Review Comment:
   ```suggestion
        fs.StringVar(&s.etcdTLSCertFile, flagEtcdTLSCertFile, "", "Etcd client 
certificate")
   ```



##########
banyand/metadata/client.go:
##########
@@ -56,6 +71,11 @@ func (s *clientService) FlagSet() *run.FlagSet {
        fs := run.NewFlagSet("metadata")
        fs.StringVar(&s.namespace, "namespace", "banyandb", "The namespace of 
the metadata stored in etcd")
        fs.StringArrayVar(&s.endpoints, flagEtcdEndpointsName, 
[]string{"http://localhost:2379"}, "A comma-delimited list of etcd endpoints")
+       fs.StringVar(&s.etcdUsername, flagEtcdUsername, "", "A username of 
etcd")
+       fs.StringVar(&s.etcdPassword, flagEtcdPassword, "", "A password of etcd 
user")
+       fs.StringVar(&s.etcdTLSCAFile, flagEtcdTLSCAFile, "", "A trusted ca 
file of etcd tls config")

Review Comment:
   ```suggestion
        fs.StringVar(&s.etcdTLSCAFile, flagEtcdTLSCAFile, "", "Trusted 
certificate authority")
   ```



##########
banyand/metadata/client.go:
##########
@@ -56,6 +71,11 @@ func (s *clientService) FlagSet() *run.FlagSet {
        fs := run.NewFlagSet("metadata")
        fs.StringVar(&s.namespace, "namespace", "banyandb", "The namespace of 
the metadata stored in etcd")
        fs.StringArrayVar(&s.endpoints, flagEtcdEndpointsName, 
[]string{"http://localhost:2379"}, "A comma-delimited list of etcd endpoints")
+       fs.StringVar(&s.etcdUsername, flagEtcdUsername, "", "A username of 
etcd")
+       fs.StringVar(&s.etcdPassword, flagEtcdPassword, "", "A password of etcd 
user")
+       fs.StringVar(&s.etcdTLSCAFile, flagEtcdTLSCAFile, "", "A trusted ca 
file of etcd tls config")
+       fs.StringVar(&s.etcdTLSCertFile, flagEtcdTLSCertFile, "", "A cert file 
of etcd tls config")
+       fs.StringVar(&s.etcdTLSKeyFile, flagEtcdTLSKeyFile, "", "A key file of 
etcd tls config")

Review Comment:
   ```suggestion
        fs.StringVar(&s.etcdTLSKeyFile, flagEtcdTLSKeyFile, "", "Private key 
for the etcd client certificate.")
   ```



##########
banyand/metadata/client.go:
##########
@@ -35,17 +35,32 @@ import (
 
 const flagEtcdEndpointsName = "etcd-endpoints"
 
+const flagEtcdUsername = "etcd-username"
+
+const flagEtcdPassword = "etcd-password"
+
+const flagEtcdTLSCAFile = "etcd-tls-ca-file"
+
+const flagEtcdTLSCertFile = "etcd-tls-cert-file"
+
+const flagEtcdTLSKeyFile = "etcd-tls-key-file"
+
 // NewClient returns a new metadata client.
 func NewClient(_ context.Context) (Service, error) {
        return &clientService{closer: run.NewCloser(1)}, nil
 }
 
 type clientService struct {
-       namespace      string
-       schemaRegistry schema.Registry
-       alc            *allocator
-       closer         *run.Closer
-       endpoints      []string
+       namespace       string
+       etcdUsername    string
+       etcdPassword    string
+       etcdTLSCAFile   string
+       etcdTLSCertFile string
+       etcdTLSKeyFile  string

Review Comment:
   Both of these fields must either be present together or not at all. Please 
add a checker to verify it.



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

Reply via email to