This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb.git
The following commit(s) were added to refs/heads/main by this push:
new c361805d polish cmd flags and keep the style of linking multiple words
with "-". (#295)
c361805d is described below
commit c361805d225cc9bb85ddf634ae6a6dd8b0758595
Author: Harry <[email protected]>
AuthorDate: Thu Jul 6 03:11:15 2023 +0800
polish cmd flags and keep the style of linking multiple words with "-".
(#295)
* polish cmd flags
* update doc
---------
Co-authored-by: 吴晟 Wu Sheng <[email protected]>
---
banyand/internal/cmd/standalone.go | 8 ++++----
banyand/liaison/grpc/server.go | 12 ++++++------
banyand/liaison/http/server.go | 8 ++++----
banyand/metadata/metadata.go | 6 +++---
docs/installation.md | 8 ++++----
5 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/banyand/internal/cmd/standalone.go
b/banyand/internal/cmd/standalone.go
index 215dcb2f..7a91cd77 100644
--- a/banyand/internal/cmd/standalone.go
+++ b/banyand/internal/cmd/standalone.go
@@ -117,10 +117,10 @@ func newStandaloneCmd() *cobra.Command {
},
}
- standaloneCmd.Flags().StringVarP(&logging.Env, "logging.env", "",
"prod", "the logging")
- standaloneCmd.Flags().StringVarP(&logging.Level, "logging.level", "",
"info", "the root level of logging")
- standaloneCmd.Flags().StringArrayVarP(&logging.Modules,
"logging.modules", "", nil, "the specific module")
- standaloneCmd.Flags().StringArrayVarP(&logging.Levels,
"logging.levels", "", nil, "the level logging of logging")
+ standaloneCmd.Flags().StringVar(&logging.Env, "logging-env", "prod",
"the logging")
+ standaloneCmd.Flags().StringVar(&logging.Level, "logging-level",
"info", "the root level of logging")
+ standaloneCmd.Flags().StringArrayVar(&logging.Modules,
"logging-modules", nil, "the specific module")
+ standaloneCmd.Flags().StringArrayVar(&logging.Levels, "logging-levels",
nil, "the level logging of logging")
standaloneCmd.Flags().AddFlagSet(g.RegisterFlags().FlagSet)
return standaloneCmd
}
diff --git a/banyand/liaison/grpc/server.go b/banyand/liaison/grpc/server.go
index 4b3142b8..a92ff7a6 100644
--- a/banyand/liaison/grpc/server.go
+++ b/banyand/liaison/grpc/server.go
@@ -173,12 +173,12 @@ func (s *server) FlagSet() *run.FlagSet {
fs := run.NewFlagSet("grpc")
s.maxRecvMsgSize = defaultRecvSize
fs.VarP(&s.maxRecvMsgSize, "max-recv-msg-size", "", "the size of max
receiving message")
- fs.BoolVarP(&s.tls, "tls", "", false, "connection uses TLS if true,
else plain TCP")
- fs.StringVarP(&s.certFile, "cert-file", "", "", "the TLS cert file")
- fs.StringVarP(&s.keyFile, "key-file", "", "", "the TLS key file")
- fs.StringVarP(&s.addr, "addr", "", ":17912", "the address of banyand
listens")
- fs.BoolVarP(&s.enableIngestionAccessLog, "enable-ingestion-access-log",
"", false, "enable ingestion access log")
- fs.StringVarP(&s.accessLogRootPath, "access-log-root-path", "", "",
"access log root path")
+ fs.BoolVar(&s.tls, "tls", false, "connection uses TLS if true, else
plain TCP")
+ fs.StringVar(&s.certFile, "cert-file", "", "the TLS cert file")
+ fs.StringVar(&s.keyFile, "key-file", "", "the TLS key file")
+ fs.StringVar(&s.addr, "addr", ":17912", "the address of banyand
listens")
+ fs.BoolVar(&s.enableIngestionAccessLog, "enable-ingestion-access-log",
false, "enable ingestion access log")
+ fs.StringVar(&s.accessLogRootPath, "access-log-root-path", "", "access
log root path")
return fs
}
diff --git a/banyand/liaison/http/server.go b/banyand/liaison/http/server.go
index 1690c689..2cbba9b8 100644
--- a/banyand/liaison/http/server.go
+++ b/banyand/liaison/http/server.go
@@ -79,10 +79,10 @@ func (p *service) FlagSet() *run.FlagSet {
flagSet := run.NewFlagSet("http")
flagSet.StringVar(&p.listenAddr, "http-addr", ":17913", "listen addr
for http")
flagSet.StringVar(&p.grpcAddr, "http-grpc-addr", "localhost:17912",
"http server redirect grpc requests to this address")
- flagSet.StringVarP(&p.certFile, "http-cert-file", "", "", "the TLS cert
file of http server")
- flagSet.StringVarP(&p.keyFile, "http-key-file", "", "", "the TLS key
file of http server")
- flagSet.StringVarP(&p.grpcCert, "http-grpc-cert-file", "", "", "the
grpc TLS cert file if grpc server enables tls")
- flagSet.BoolVarP(&p.tls, "http-tls", "", false, "connection uses TLS if
true, else plain HTTP")
+ flagSet.StringVar(&p.certFile, "http-cert-file", "", "the TLS cert file
of http server")
+ flagSet.StringVar(&p.keyFile, "http-key-file", "", "the TLS key file of
http server")
+ flagSet.StringVar(&p.grpcCert, "http-grpc-cert-file", "", "the grpc TLS
cert file if grpc server enables tls")
+ flagSet.BoolVar(&p.tls, "http-tls", false, "connection uses TLS if
true, else plain HTTP")
return flagSet
}
diff --git a/banyand/metadata/metadata.go b/banyand/metadata/metadata.go
index e4f3dd46..86697a8a 100644
--- a/banyand/metadata/metadata.go
+++ b/banyand/metadata/metadata.go
@@ -70,9 +70,9 @@ type service struct {
func (s *service) FlagSet() *run.FlagSet {
fs := run.NewFlagSet("metadata")
- fs.StringVarP(&s.rootDir, "metadata-root-path", "", "/tmp", "the root
path of metadata")
- fs.StringVarP(&s.listenClientURL, "etcd-listen-client-url", "",
"http://localhost:2379", "A URL to listen on for client traffic")
- fs.StringVarP(&s.listenPeerURL, "etcd-listen-peer-url", "",
"http://localhost:2380", "A URL to listen on for peer traffic")
+ fs.StringVar(&s.rootDir, "metadata-root-path", "/tmp", "the root path
of metadata")
+ fs.StringVar(&s.listenClientURL, "etcd-listen-client-url",
"http://localhost:2379", "A URL to listen on for client traffic")
+ fs.StringVar(&s.listenPeerURL, "etcd-listen-peer-url",
"http://localhost:2380", "A URL to listen on for peer traffic")
return fs
}
diff --git a/docs/installation.md b/docs/installation.md
index 89b79144..6e3ef2d2 100644
--- a/docs/installation.md
+++ b/docs/installation.md
@@ -139,10 +139,10 @@ Flags:
--http-key-file string the TLS key file of http server
--http-tls connection uses TLS if true, else
plain HTTP
--key-file string the TLS key file
- --logging.env string the logging (default "prod")
- --logging.level string the root level of logging
(default "info")
- --logging.levels stringArray the level logging of logging
- --logging.modules stringArray the specific module
+ --logging-env string the logging (default "prod")
+ --logging-level string the root level of logging
(default "info")
+ --logging-levels stringArray the level logging of logging
+ --logging-modules stringArray the specific module
--max-recv-msg-size bytes the size of max receiving message
(default 10.00MiB)
--measure-buffer-size bytes block buffer size (default
4.00MiB)
--measure-encoder-buffer-size bytes block fields buffer size (default
12.00MiB)