Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

style: use no-secure option instead of secure option #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var dbHost = flag.String("host", "localhost", "The host address of GreptimeDB.")
var db = flag.String("db", "public", "The name of the database of GreptimeDB.")
var username = flag.String("username", "", "The username of the database.")
var password = flag.String("password", "", "The password of the database.")
var secure = flag.Bool("secure", true, "Whether to use secure connection to GreptimeDB. `true` or `false`. Default is `true`.")
var noSecure = flag.Bool("no-secure", false, "Do not use secure connection to GreptimeDB. `true` or `false`. Default is `false`.")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

insecure

var port = flag.String("port", "", "The port of the HTTP endpoint of GreptimeDB.")

func main() {
Expand All @@ -34,7 +34,7 @@ func main() {
otlpmetrichttp.WithURLPath("/v1/otlp/v1/metrics"),
otlpmetrichttp.WithTimeout(time.Second * 5)}

if !*secure {
if *noSecure {
opts = append(opts, otlpmetrichttp.WithInsecure())
}

Expand Down