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

many spire watch connection #318

Closed
penghuazhou opened this issue Jan 23, 2025 · 2 comments
Closed

many spire watch connection #318

penghuazhou opened this issue Jan 23, 2025 · 2 comments

Comments

@penghuazhou
Copy link

If invoke "func run(ctx context.Context)" five time, there will also be five watches listening for changes in the Spire certificate, which will waste Spire's connection resources.

https://github.com/spiffe/go-spiffe/blob/main/v2/examples/spiffe-tls/client/main.go

Image

@azdagron
Copy link
Member

That is a simplified example which leverages MTLSClientWithSourceOptions to create an X.509 source underneath the covers.

If you want to share a single X.509 source, use MTLSClientWithSource instead.

@penghuazhou
Copy link
Author

thanks

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

2 participants