You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have the option of setting the custom RetryConfiguration in the client_options.go file via the func WithRetryConfiguration(configuration RetryConfiguration) ClientOption() function.
But, when using this function, what If we set only partial fields in the struct type RetryConfiguration struct that we would want to control like
I would expect the HTTP calls to go through fine and the rest of fields of the type RetryConfiguration struct to be set to defaults if we aren't setting it similar to what func DefaultConfiguration() ClientConfiguration is doing.
Can the method func WithRetryConfiguration() not check the unset fields and set them to defaults?
is throwing errors complaining about Nil pointer dereference errors as the remaining fields CheckRetry, Backoff, ErrorHandler & Logger are unset during the http call.
Failure Information
Please include the version of Vault binary and the version of vault-client-go you're using.
vault-client-go-v0.3.3
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Thanks for creating this issue, @rohitss912, and sorry for the delayed response as I was away on vacation.
I would expect the HTTP calls to go through fine and the rest of fields of the type RetryConfiguration struct to be set to defaults if we aren't setting it similar to what func DefaultConfiguration() ClientConfiguration is doing.
Yes, this makes sense to me. The fix should be relatively easy, I think.
Expected Behavior
We have the option of setting the custom RetryConfiguration in the client_options.go file via the
func WithRetryConfiguration(configuration RetryConfiguration) ClientOption()
function.But, when using this function, what If we set only partial fields in the struct
type RetryConfiguration struct
that we would want to control likeI would expect the HTTP calls to go through fine and the rest of fields of the
type RetryConfiguration struct
to be set to defaults if we aren't setting it similar to whatfunc DefaultConfiguration() ClientConfiguration
is doing.Can the method
func WithRetryConfiguration()
not check the unset fields and set them to defaults?Current Behavior
What is the current behavior?
Current snippet :
is throwing errors complaining about Nil pointer dereference errors as the remaining fields
CheckRetry, Backoff, ErrorHandler & Logger
are unset during the http call.Failure Information
Please include the version of Vault binary and the version of
vault-client-go
you're using.vault-client-go-v0.3.3
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
Additional Information
Full Stack trace
The text was updated successfully, but these errors were encountered: