-
Notifications
You must be signed in to change notification settings - Fork 68
feat(chpool): add healthcheck function #1088
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
base: main
Are you sure you want to change the base?
Conversation
|
Neven Miculinic seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
901e513 to
5833ddf
Compare
5833ddf to
f6bed41
Compare
e664181 to
c8638bb
Compare
| } | ||
| } | ||
|
|
||
| func (p *Pool) connIsHealthy(res *puddle.Resource[*connResource]) bool { |
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.
Happy to change this name to something better
| o.HealthCheckTimeout = DefaultHealthCheckTimeout | ||
| } | ||
| if o.ClientOptions.Logger == nil { | ||
| o.ClientOptions.Logger = zap.NewNop() |
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.
To prevent any nil-ptr exception later
68dfbb1 to
50d4213
Compare
50d4213 to
10694d0
Compare
|
@SpencerTorres @ernado mind having a look at this PR? |
|
@ernado perhaps you're more familiar with this pooling code? |
|
This code was contributed + I'm not using pools, so I'm familiar in same degree as you. |
|
@SpencerTorres @ernado any movement on this? What would make you happy to accept this PR |
Summary
Adding chpool healthchecking option.
Defaulting to
PingChecklist
Delete items not relevant to your PR: