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

clients.ClientBuilder should support tls.Config and clients.SecurityBuilder. #15

Open
joshua-rutherford opened this issue Dec 6, 2019 · 3 comments

Comments

@joshua-rutherford
Copy link
Contributor

As written, the example on the README.md suggests that a ClientBuilder.WithSecurity accepts a tls.Config (i.e., the result of SecurityBuilder.Build()) but that is not the case. It requires a SecuirtyConfig. I think a more appropriate approach would be to support the following signatures:

func (b *ClientBuilder) WithSecuirtyBuilder(builder *SecurityBuilder) *ClientBuilder {...}

func (b *ClientBuilder) WithTLS(config *tls.Config) *ClientBuilder {...}

To do this we'd need to define the precedence order which can be arbitrary but must be documented.

@joshua-rutherford
Copy link
Contributor Author

@critterjohnson, do you think you can take this on?

@izzy-shirron
Copy link

@joshua-rutherford to make the new function WithTLS do I need to add a *tls.configto the ClientConfig struct or the SceurityConfig struct?

@joshua-rutherford
Copy link
Contributor Author

See the above examples, these methods are being added to the ClientBuilder.

@critterjohnson critterjohnson removed their assignment Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants