-
Notifications
You must be signed in to change notification settings - Fork 328
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
feat( logc, persistentevent ): support es auth #903
Conversation
|
||
this.esDetection = this.esDetection.bind(this); | ||
|
||
/** checkESStatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better way is use enum,but it's ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
+1 |
please help fix conflict issue, then I will get it merged |
[+] add domain regex, es auth add(logc): es password base64 add(persistentevent): UI support ES Auth add(persistentevent): psw encode, %{} to fluentd add(persistentevent): fixed input style width ES: es detection add(web): logc es detection, http request timeout add(web): persistentEvent es detection add(web): ES detection button disabled add(web): es host and index required feat(es auth): update pb
fae8fae
to
87b6c73
Compare
done |
return nil, fmt.Errorf("es detection: unable to generate request") | ||
} | ||
|
||
client := &http.Client{Timeout: time.Second * 5} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't creat http.Client in method, this may cause handle leak.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it, but can't find memory leak here. Any examples? THX
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://stackoverflow.com/questions/62904351/singleton-http-client
Create customized client may happen in multiple goroutine, the client won't reuse other clients' connection.
At worst, tcp sockets will be exhausted.s
In your cause, this method may just runs in single goroutine. But in the future, it may be used by someone in multiple goroutines
…on (tkestack#903) [+] add domain regex, es auth add(logc): es password base64 add(persistentevent): UI support ES Auth add(persistentevent): psw encode, %{} to fluentd add(persistentevent): fixed input style width ES: es detection add(web): logc es detection, http request timeout add(web): persistentEvent es detection add(web): ES detection button disabled add(web): es host and index required feat(es auth): update pb Co-authored-by: yiwenshao <shaoyiwenet@gmail.com>
Fixes #804